Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
text/template: improve error message about empty/incomplete templates after Funcs() #4522
The error message is here: http://golang.org/src/pkg/text/template/exec.go#L115 I've noticed that this has caused problems for people both on the mailing list and on IRC. This often comes up with respect to template.Funcs, where you suddenly have to create an empty template before you can attach functions to it. Possible improvements: - say "did you mean to call ExecuteTemplate?" - include a list of complete templates that do exist in the template set - provide a top-level Funcs() function that returns a template on which ParseFiles has its top-level effect of causing the first template to be selected on Execute - explain a bit more what's going on in the documentation for the functions above, and add examples