Created
October 8, 2015 10:30
-
-
Save goldalworming/80633bfda6df4a3ca595 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func pasteHandler(w http.ResponseWriter, r *http.Request) { | |
paste_id := strings.TrimPrefix(r.URL.Path, "/paste") | |
paste := &Paste{UUID: paste_id} | |
keep_alive := false | |
burn_after_reading := false | |
data := struct { | |
Paste *Paste | |
KeepAlive bool | |
BurnAfterReading bool | |
} { | |
paste, | |
keep_alive, | |
burn_after_reading, | |
} | |
t, _ := template.ParseFiles("templates/paste.html") | |
t.Execute(w, data) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment