This commit is contained in:
wyf5229
2020-09-10 16:08:06 +08:00
commit b4a7f4e53f
10 changed files with 1106 additions and 0 deletions

14
common.go Normal file
View File

@ -0,0 +1,14 @@
package main
import (
"bytes"
"encoding/json"
)
func formatJson(v interface{}) []byte {
marshal, _ := json.Marshal(v)
var b bytes.Buffer
json.Indent(&b, marshal, "", " ")
return b.Bytes()
}