package template import "html/template" // list of embedded template files. var files = []struct { name string data string }{ { name: "error.html", data: error, }, { name: "index.html", data: index, }, { name: "index_polymer.html", data: indexpolymer, }, { name: "login.html", data: login, }, { name: "logout.html", data: logout, }, } // T exposes the embedded templates. var T *template.Template func init() { T = template.New("_").Funcs(funcMap) for _, file := range files { T = template.Must( T.New(file.name).Parse(file.data), ) } } // // embedded template files. // // files/error.html var error = ` error | drone {{ .error }} ` // files/index.html var index = ` {{ if .csrf }}{{ end }}
` // files/index_polymer.html var indexpolymer = ` ` // files/login.html var login = ` login | drone
` // files/logout.html var logout = `LOGOUT `