Created
August 24, 2021 14:16
-
-
Save michelleN/86528581269ca0551bb5eb455fdf5bfe to your computer and use it in GitHub Desktop.
print go struct
This file contains 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
func prettyPrint(i interface{}) string { | |
s, _ := json.MarshalIndent(i, "", "\t") | |
return string(s) | |
} | |
https://stackoverflow.com/questions/24512112/how-to-print-struct-variables-in-console |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment