Fix spacing in html response type
This commit is contained in:
parent
a53c3b814b
commit
6660ecf1b6
10
main.go
10
main.go
|
@ -166,11 +166,11 @@ func saveHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
w.Write(x)
|
w.Write(x)
|
||||||
case "html":
|
case "html":
|
||||||
w.Header().Set("Content-Type", "text/html")
|
w.Header().Set("Content-Type", "text/html")
|
||||||
io.WriteString(w, "<p>ID</p><p>"+b.ID+"</p><br/>")
|
io.WriteString(w, "<p><b>ID</b>: "+b.ID+"</p><br/>")
|
||||||
io.WriteString(w, "<p>hash</p><p>"+string(b.HASH)+"</p><br/>")
|
io.WriteString(w, "<p><b>Hash</b>"+string(b.HASH)+"</p><br/>")
|
||||||
io.WriteString(w, "<p>URL</p><a href='"+b.URL+"'>"+b.URL+"</a><br/>")
|
io.WriteString(w, "<p><b>URL</b><a href='"+b.URL+"'>"+b.URL+"</a></p><br/>")
|
||||||
io.WriteString(w, "<p>hash</p><p>"+string(b.SIZE)+"</p><br/>")
|
io.WriteString(w, "<p><b>Size</b>"+string(b.SIZE)+"</p><br/>")
|
||||||
io.WriteString(w, "<a href='"+b.URL+"/p/"+b.DELKEY+"'>"+b.DELKEY+"</a>")
|
io.WriteString(w, "<p><b>Delete Key</b><a href='"+b.URL+"/p/"+b.DELKEY+"'>"+b.DELKEY+"</a></p>")
|
||||||
|
|
||||||
default:
|
default:
|
||||||
io.WriteString(w, b.URL+"\n")
|
io.WriteString(w, b.URL+"\n")
|
||||||
|
|
Loading…
Reference in New Issue