summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorMarin Ivanov <[email protected]>2026-01-19 10:41:31 +0200
committerMarin Ivanov <[email protected]>2026-01-19 10:41:31 +0200
commit911c2226b82ec01c0e7ee98ed87d7b6d03114505 (patch)
treedf3fb4516a2bcf577b2d6936a2d7cf6ab7a6d53d /main.go
parentb117769ad9648240fbcf7500a8039ebe297aafe7 (diff)
change []byte(fmt.Sprintf(...)) to fmt.Appendf(nil, ...)
Diffstat (limited to 'main.go')
-rw-r--r--main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.go b/main.go
index ac52a8b..1ba9292 100644
--- a/main.go
+++ b/main.go
@@ -61,7 +61,7 @@ func serveAnsiHtml(w http.ResponseWriter, filename string) {
return
}
data = ansihtml.ConvertToHTML(data)
- data = []byte(fmt.Sprintf("<pre>%s</pre>", strings.ReplaceAll(string(data), "\n", "<br>")))
+ data = fmt.Appendf(nil, "<pre>%s</pre>", strings.ReplaceAll(string(data), "\n", "<br>"))
w.Write(data)
}