format code

This commit is contained in:
Ming Deng
2020-12-14 12:22:44 +08:00
parent 181a5b6ef6
commit d4da82ef77
51 changed files with 174 additions and 183 deletions

View File

@@ -60,7 +60,7 @@ func formatTimeHeader(when time.Time) ([]byte, int, int) {
y, mo, d := when.Date()
h, mi, s := when.Clock()
ns := when.Nanosecond() / 1000000
//len("2006/01/02 15:04:05.123 ")==24
// len("2006/01/02 15:04:05.123 ")==24
var buf [24]byte
buf[0] = y1[y/1000%10]
@@ -126,12 +126,12 @@ func initColor() {
cyan = w32Cyan
}
colorMap = map[string]string{
//by color
// by color
"green": green,
"white": white,
"yellow": yellow,
"red": red,
//by method
// by method
"GET": blue,
"POST": cyan,
"PUT": yellow,