Created
December 30, 2020 20:29
-
-
Save percybolmer/d93c18dfbac1447bb8bb9272666a32a7 to your computer and use it in GitHub Desktop.
Prints to a string builder
This file contains hidden or 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
// 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