To enforce a codestyle in a Go project, one can use the gofmt
tool to format .go
files, and make it part of the build chain.
Is there any possibility to enforce proper formatting of Go template files (usually .html.tmpl
extension—the gohtmltmpl
filetype on Vim) with a CLI tool, to be used in a continuous integration system?
All the “HTML prettifier” tools I found are not aware of Go templates, and mess up the indenting of such files.