Skip to content

Instantly share code, notes, and snippets.

@inhies
Created August 14, 2017 06:32
Show Gist options
  • Save inhies/4d1ba87f1ee6aa25d5708de1f5a3d9b8 to your computer and use it in GitHub Desktop.
Save inhies/4d1ba87f1ee6aa25d5708de1f5a3d9b8 to your computer and use it in GitHub Desktop.
pretty print structs
func PrettyPrint(v interface{}) {
b, _ := json.MarshalIndent(v, "", " ")
println(string(b))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment