When I run:
t, _ := template.ParseFiles("index.html") t.Execute(w, nil)
the page is loading fine. But when I try to run
t := template.New("first") t, _ = t.ParseFiles("index.html") t.Execute(w, nil)
the only thing loading is a blank page. I am trying to change the separator values ββin a Golang html template and would like to make a template, change the separator values, and then parse the file.
Does anyone else have this problem?
go templates
ejones
source share