From f447299214983834c478c98d11f2b110c9bc37e0 Mon Sep 17 00:00:00 2001 From: Eliot Whalan Date: Thu, 23 Jun 2016 19:10:36 +1000 Subject: [PATCH] Add raw link --- assets/paste.html | 4 ++++ main.go | 2 ++ 2 files changed, 6 insertions(+) diff --git a/assets/paste.html b/assets/paste.html index 98588b5..cec531f 100644 --- a/assets/paste.html +++ b/assets/paste.html @@ -29,6 +29,10 @@ +
+ + +
diff --git a/main.go b/main.go index 1c9cbb3..897aaa8 100644 --- a/main.go +++ b/main.go @@ -40,6 +40,7 @@ type Response struct { type Page struct { Title string Body []byte + Link string } func check(err error) { @@ -228,6 +229,7 @@ func pasteHandler(w http.ResponseWriter, r *http.Request) { p := &Page{ Title: paste, Body: []byte(s), + Link: ADDRESS + "/raw/" + paste } t, err := template.ParseFiles("assets/paste.html") if err != nil {