From d0f5ffda695c1e5ac971df154ee56818a7ece479 Mon Sep 17 00:00:00 2001 From: Eliot Whalan Date: Thu, 23 Jun 2016 20:15:13 +1000 Subject: [PATCH] Bring back print statement part 2 --- assets/paste.html | 2 +- main.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/paste.html b/assets/paste.html index c8e2bd7..ad38ee7 100644 --- a/assets/paste.html +++ b/assets/paste.html @@ -31,7 +31,7 @@
- {{printf "%s".Body}} + {{printf "%s" .Body}}
diff --git a/main.go b/main.go index a6f5940..ece7de4 100644 --- a/main.go +++ b/main.go @@ -39,7 +39,7 @@ type Response struct { type Page struct { Title string - Body string + Body []byte Link string } @@ -231,7 +231,7 @@ func pasteHandler(w http.ResponseWriter, r *http.Request) { link := ADDRESS + "/raw/" + paste p := &Page{ Title: paste, - Body: s, + Body: []byte(s), Link: link, } t, err := template.ParseFiles("assets/paste.html")