It says that it requires goimports for formatting, so I did go get it. How do I use hero to format or beautify the HTML code? I have three files: header.html, footer.html, and index.html. The code in all of these files start at column 1, so when they are put together, the result is misaligned code. Is there a way to format them besides doing it manually, i.e. not beginning code at column 1?
Hello.
It says that it requires
goimports
for formatting, so I didgo get
it. How do I usehero
to format or beautify the HTML code? I have three files:header.html
,footer.html
, andindex.html
. The code in all of these files start at column 1, so when they are put together, the result is misaligned code. Is there a way to format them besides doing it manually, i.e. not beginning code at column 1?Do I need to use something like https://github.com/yosssi/gohtml?
Hmm,
gohtml.FormatBytes()
does the job. I guess this will do.