Log objects via JSON for better debugging
This commit is contained in:
1 parent
882bff292e
commit
8a45292e24
2 files changed
+19
-9
No files matched your search
+10
@@ -0,0 +1,10 @@
|
||||
package npc
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
func js(v interface{}) string {
|
||||
a, _ := json.Marshal(v)
|
||||
return string(a)
|
||||
}
|
||||
Reference in new issue
Block a user