拆分logger库

This commit is contained in:
2022-05-14 13:04:01 +08:00
parent 90239ac34f
commit 941e7a1871
9 changed files with 1189 additions and 1 deletions

26
debug.go Normal file
View File

@ -0,0 +1,26 @@
// Package logger...
//
// Description : logger...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2021-01-03 12:58 上午
package logger
import (
"bytes"
"encoding/json"
)
// FormatJson 格式化输出json
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 1:06 上午 2021/1/3
func FormatJson(src interface{}) string {
byteData, _ := json.Marshal(src)
var str bytes.Buffer
_ = json.Indent(&str, byteData, "", " ")
return str.String()
}