improve logging feature for ghttp.Server

This commit is contained in:
John
2019-11-08 19:52:49 +08:00
parent 21efde1a38
commit 8f2c62d444
11 changed files with 92 additions and 61 deletions

View File

@ -1,12 +1,17 @@
package main
import (
"bytes"
"fmt"
"regexp"
)
func main() {
replaceCharReg, err := regexp.Compile(`[\-\.\_\s]+`)
//b := make([]byte, 10)
r := bytes.NewBuffer(make([]byte, 1))
n, err := r.Write([]byte("12345"))
fmt.Println(n)
fmt.Println(err)
fmt.Println(replaceCharReg.ReplaceAllString("s--s.s.a b", ""))
fmt.Println(r.String())
}