Closed errashe closed 6 years ago
Actually, i found solution. In function, which one should check existing those templates there is a mistake: empty Templates
directory fills with templates
string. And when parsing templates - just skiping them all, cuz they don't have substring with this templates
string. So, i need to add substring to my AssetNames function to make sure, what everything works properly.
AssetNames: func() []string {
var ret []string
for _, el := range box.List() {
ret = append(ret, Sprintf("/%s", el))
}
return ret
},
Directory: "/",
And everything works as expected.
Won't work: html/template: "main" is undefined. But box.MustBytes("main.tmpl") returns bytes from file. No additional docs found (or i can't). What i doing wrong?