Make body string type
This commit is contained in:
parent
1aed57a4e2
commit
b4ee4a69c3
4
main.go
4
main.go
|
@ -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")
|
||||||
|
|
Loading…
Reference in New Issue