Skip to content

Instantly share code, notes, and snippets.

@percybolmer
Created December 30, 2020 20:29
Show Gist options
  • Save percybolmer/d93c18dfbac1447bb8bb9272666a32a7 to your computer and use it in GitHub Desktop.
Save percybolmer/d93c18dfbac1447bb8bb9272666a32a7 to your computer and use it in GitHub Desktop.
Prints to a string builder
// printCategory will output all items inside a Log slice and a title
func printCategory(output *strings.Builder, title string, logs []string) {
if len(logs) > 0 {
output.WriteString(fmt.Sprintf("\n\n## %s \n", title))
for _, item := range logs {
output.WriteString(item + "\n")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment