Skip to content

Instantly share code, notes, and snippets.

Created August 4, 2014 15:46
What would you like to do?
Go master pages example
{{define "title"}}Home page{{end}}
{{define "body"}}
Welcome to the home page!
{{template "masterpage_layout.html"}}
// Pseudo syntax example.
func main() {
var writer io.Writer
var data interface{}
// viewengine.Text() is also available
engine := viewengine.Html().Funcs(...)
engine.Render(writer, "home.html", data)
<title>{{template "title"}}</title>
{{template "body"}}
{{template "analytics.html"}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment