Log objects via JSON for better debugging

This commit is contained in:
Bryan Boreham committed 2016-12-06 17:40:17 +00:00
1 parent 882bff292e
commit 8a45292e24
2 files changed
+19 -9

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
package npc
import (
"encoding/json"
)
func js(v interface{}) string {
a, _ := json.Marshal(v)
return string(a)
}