标签:
我开发中一直用这一段
//for debugging
func printPretty(v interface{}, mark string) (err error) {
fmt.Printf("*********%s\n", mark)
data, err := json.MarshalIndent(v, "", " ")
if err != nil {
return
}
data = append(data, ‘\n‘)
os.Stdout.Write(data)
return
}
标签:
原文地址:http://www.cnblogs.com/php-rearch/p/5975890.html