Skip to content

Instantly share code, notes, and snippets.

View DanielMorsing's full-sized avatar

Daniel Morsing DanielMorsing

View GitHub Profile
package main
import (
"net/http"
"path"
)
var fshandler = http.FileServer(http.Dir("assets/"))
func scrubber(w http.ResponseWriter, r *http.Request) {
<!DOCTYPE HTML>
<html>
{{template "header"}} //this i want executed before runtime
<body>
{{template "navbar" "Blog"}} //same with this
</body>
//all this should only be executed at runtime
MAGIC ESCAPE THINGY
{{.title}}