Skip to content

Instantly share code, notes, and snippets.

@michelleN
Created August 24, 2021 14:16
Show Gist options
  • Save michelleN/86528581269ca0551bb5eb455fdf5bfe to your computer and use it in GitHub Desktop.
Save michelleN/86528581269ca0551bb5eb455fdf5bfe to your computer and use it in GitHub Desktop.
print go struct
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