Bring back print statement part 2
This commit is contained in:
parent
98bd39ceae
commit
2bdada3d66
|
@ -31,7 +31,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="well" style="padding-top: 10px;">
|
<div class="well" style="padding-top: 10px;">
|
||||||
{{printf "%s".Body}}
|
{{printf "%s" .Body}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
|
|
4
main.go
4
main.go
|
@ -39,7 +39,7 @@ type Response struct {
|
||||||
|
|
||||||
type Page struct {
|
type Page struct {
|
||||||
Title string
|
Title string
|
||||||
Body string
|
Body []byte
|
||||||
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: s,
|
Body: []byte(s),
|
||||||
Link: link,
|
Link: link,
|
||||||
}
|
}
|
||||||
t, err := template.ParseFiles("assets/paste.html")
|
t, err := template.ParseFiles("assets/paste.html")
|
||||||
|
|
Loading…
Reference in New Issue