Make body string type

This commit is contained in:
Eliot Whalan 2016-06-23 19:58:29 +10:00
parent 1aed57a4e2
commit b4ee4a69c3
1 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ type Response struct {
type Page struct { type Page struct {
Title string Title string
Body []byte Body string
Link string Link string
} }
@ -231,7 +231,7 @@ func pasteHandler(w http.ResponseWriter, r *http.Request) {
link := ADDRESS + "/raw/" + paste link := ADDRESS + "/raw/" + paste
p := &Page{ p := &Page{
Title: paste, Title: paste,
Body: []byte(s), Body: s,
Link: link, Link: link,
} }
t, err := template.ParseFiles("assets/paste.html") t, err := template.ParseFiles("assets/paste.html")