From 55106def645c3ffd5a8b2fd2cfa55d5ec3c2a669 Mon Sep 17 00:00:00 2001 From: koyeo Date: Thu, 26 Jan 2023 11:48:00 +0800 Subject: [PATCH] add json --- json.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 json.go diff --git a/json.go b/json.go new file mode 100644 index 0000000..2a1f013 --- /dev/null +++ b/json.go @@ -0,0 +1,11 @@ +package spew + +import ( + "encoding/json" + "fmt" +) + +func Json(a any) { + d, _ := json.MarshalIndent(a, "", "\t") + fmt.Println(string(d)) +}