20 lines
275 B
Go
20 lines
275 B
Go
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)
|
|
}
|