snow/aid/print.go

14 lines
190 B
Go
Raw Normal View History

package aid
import (
"encoding/json"
"fmt"
)
func PrintJSON(v interface{}) {
json1, err := json.MarshalIndent(v, "", " ")
if err != nil {
panic(err)
}
fmt.Println(string(json1))
}