]> Sergey Matveev's repositories - tofuproxy.git/blobdiff - rounds/gemini.go
More Fprintf usage
[tofuproxy.git] / rounds / gemini.go
index 5c831d4e523ece81d6d40febdc21407ea7c166bf..d81039fd01872a9aabd2627658de1b8fb68a2848 100644 (file)
@@ -151,13 +151,9 @@ func RoundGemini(
                w.Header().Add("Content-Type", "text/html")
                w.WriteHeader(http.StatusOK)
                u := geminifyURL(host, cols[1], paths...)
-               w.Write([]byte(
-                       fmt.Sprintf(
-                               `<!DOCTYPE html>
+               fmt.Fprintf(w, `<!DOCTYPE html>
 <html><head><title>%d (%s) redirection</title></head>
-<body><a href="%s">%s</a></body></html>`,
-                               code, codeName, u, u,
-                       )))
+<body><a href="%s">%s</a></body></html>`, code, codeName, u, u)
                fifos.LogRedir <- fmt.Sprintf(
                        "%s %s\t%d\t%s", req.Method, req.URL, code, cols[1],
                )