Fix spacing in html response type

This commit is contained in:
Eliot Whalan 2016-06-23 13:49:52 +10:00
parent a53c3b814b
commit 6660ecf1b6
1 changed files with 5 additions and 5 deletions

10
main.go
View File

@ -166,11 +166,11 @@ func saveHandler(w http.ResponseWriter, r *http.Request) {
w.Write(x)
case "html":
w.Header().Set("Content-Type", "text/html")
io.WriteString(w, "<p>ID</p><p>"+b.ID+"</p><br/>")
io.WriteString(w, "<p>hash</p><p>"+string(b.HASH)+"</p><br/>")
io.WriteString(w, "<p>URL</p><a href='"+b.URL+"'>"+b.URL+"</a><br/>")
io.WriteString(w, "<p>hash</p><p>"+string(b.SIZE)+"</p><br/>")
io.WriteString(w, "<a href='"+b.URL+"/p/"+b.DELKEY+"'>"+b.DELKEY+"</a>")
io.WriteString(w, "<p><b>ID</b>: "+b.ID+"</p><br/>")
io.WriteString(w, "<p><b>Hash</b>"+string(b.HASH)+"</p><br/>")
io.WriteString(w, "<p><b>URL</b><a href='"+b.URL+"'>"+b.URL+"</a></p><br/>")
io.WriteString(w, "<p><b>Size</b>"+string(b.SIZE)+"</p><br/>")
io.WriteString(w, "<p><b>Delete Key</b><a href='"+b.URL+"/p/"+b.DELKEY+"'>"+b.DELKEY+"</a></p>")
default:
io.WriteString(w, b.URL+"\n")