by skrtskrt · 6y ago · 0 comments
The template declaration and invocation hierarchy seems unnecessarily complex and is almost 100% undocumented. It just hurts my brain and doesn't make any sense to me in comparison to jinja, whatever jekyll uses, etc.
It has very very poor documentation. Some docstrings are not a replacement for actual documentation when your approach is that unorthodox.
And it doesn't produce any error messages or warnings when you do something wrong - just renders a completely blank template.
EDIT: to be clear, my beef is with the template hierarchy, poor docs, and lack of errors/warnings, not with the general capabilities of the library, which are quite complete.
I guess I am just used to Python where there are 1-2 all-star 3rd party packages for each use case that the community tends to coalesce around. Rust appears to be heading in a similar direction.
Since Go has so much web/http stuff baked in, it is more likely that must people just stick with the stdlib approach, even if it's a bit of a PITA.
1. The {{}} pairs confuse editor syntax coloring (in emacs, anyway).
2. Expansions that introduce or drop line breaks will cause the runtime/dlv to report line numbers that disagree with the pre-gen source you need to correct.