aboutsummaryrefslogtreecommitdiff
path: root/helper.go
diff options
context:
space:
mode:
Diffstat (limited to 'helper.go')
-rw-r--r--helper.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/helper.go b/helper.go
new file mode 100644
index 0000000..4315ac2
--- /dev/null
+++ b/helper.go
@@ -0,0 +1,15 @@
+package acme
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+func Dump(v interface{}) error {
+ body, err := json.MarshalIndent(v, "", "\t")
+ if err != nil {
+ return err
+ }
+ fmt.Println(string(body))
+ return nil
+}