Skip to content

Instantly share code, notes, and snippets.

@aldidana
Created May 3, 2018 03:56
Show Gist options
  • Select an option

  • Save aldidana/f8827ffff2f47ba9a159a16a7e7d483e to your computer and use it in GitHub Desktop.

Select an option

Save aldidana/f8827ffff2f47ba9a159a16a7e7d483e to your computer and use it in GitHub Desktop.
XML Pretty print
output, err := xml.MarshalIndent(xmlContent, " ", " ")
if err != nil {
fmt.Printf("error: %v\n", err)
}
os.Stdout.Write(output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment