Using Go Templates
I really want to love templates, but I find many aspects to be quite confusing.<p>(1): I just want to deploy a binary file. This does not seem possible with templates (unless they&#x27;re defined inside .go files, but never seen anyone do that).. also rather annoying that the tmpl files must be located in a specific directory rather than located among their components.. but I guess it wouldn&#x27;t make much sense anyway since they won&#x27;t be a part of the binary file.<p>(2): it&#x27;s really difficult to find good and medium-large scale projects that are using templates<p>(3): I have no idea what&#x27;s the right way to initialize and execute templates, this includes when the same template will be called in multiple funcs. I know how I can do it, but I don&#x27;t feel confident that I&#x27;m doing it correctly..<p>(4): it&#x27;s really exhausting to keep template code clean. With Go (and various JS frameworks) the code is automatically formatted&#x2F;linted&#x2F;whatever, but with templates nada.. can&#x27;t even figure out how to minimize it for production.<p>(5): no idea what to do with css&#x2F;js.. sometimes use inline, other times call a static file. Static files obviously benefit from being cached.. not sure how I&#x27;m supposed to cache the templates<p>I can&#x27;t really tell if there are any speed gains to using templates, so it feels like a lot of sacrifices for no obvious gain. I do think templates would be godlike if they featured vue-like structure with &quot;template&#x2F;script&#x2F;style&quot; syntax, and was easily minified and compiled into the binary. But I guess I can keep dreaming about the last part :)