aboutsummaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go12
1 files changed, 3 insertions, 9 deletions
diff --git a/main.go b/main.go
index e7aabc2..c9aebcf 100644
--- a/main.go
+++ b/main.go
@@ -32,14 +32,8 @@ func gen(w http.ResponseWriter, r *http.Request) {
return
}
- var asciiString string
+ asciiString := ASCIIRuneArray([]rune(val))
- runeArray := []rune(val)
-
- for i := 0; i < utf8.RuneCountInString(val); i++ {
- asciiString += ASCIICharacter(runeArray[i])
- }
-
- log15.Info("writing result", "result", asciiString)
- w.Write([]byte(asciiString))
+ log15.Info("writing result")
+ w.Write([]byte("<html><body style='text-align:center;background:#222;color:#ccc;'><pre><code>" + asciiString + "</code></pre></body></html>"))
}