package index import ( "html/template" "io" ) type index struct { Template template.Template } func newPage(t template.Template) *index { return &index{ Template: *t.Lookup("index.html"), } } func (page index) Send(w io.Writer) { page.Template.Execute(w, page) }