by danpalmer · 5y ago · 0 comments
My understanding of Go's built-in templating is that it is the bare-minimum templating language worth including with the language. Useful for quick and dirty plain HTML pages for inspecting service states, not for building frontends.
Does this package really intend to use Go templates for your whole frontend? That seems not ideal?
Yes, based on this page [1] it looks like that is the intension.
I built a user account manager from scratch for a company with 56M users, and utilized Go templates for all the static content and pages that only needed a handful of variables. For more complex pages, Go templates was very cumbersome, so I had to add a JavaScript framework (Vue.js) to implement pages that users were supposed to interact with. I enjoy using Go for command line tools, system background services, and web services, but for complex web development, never again.
After three (3) years working on that project, I would not recommend Go templates for complex web development at all.
[1] https://kyoto.codes/docs/core-features.html#component-lifecy...
My takeaway was that it seems to me like Go templates work well for simpler stuff; displaying simple content, debug info, etc. But as soon as you want to edit something you should start thinking about moving to a more appropriate stack.