Fix spacing in html response type
This commit is contained in:
parent
f2dc9be3bd
commit
1592004f93
10
main.go
10
main.go
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue