Created
May 16, 2020 22:15
-
-
Save adnxn/7affb1f7a8ec72e06553617a69b95a31 to your computer and use it in GitHub Desktop.
dump golang object
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "encoding/json" | |
func dump(i interface{}) string { | |
s, _ := json.MarshalIndent(i, "", "\t") | |
return string(s) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment