shiyanhui / hero

A handy, fast and powerful go template engine.
https://shiyanhui.github.io/hero
Other
1.57k stars 96 forks source link

Beautify/format the HTML code #64

Closed odiferousmint closed 5 years ago

odiferousmint commented 5 years ago

Hello.

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?

Do I need to use something like https://github.com/yosssi/gohtml?

Hmm, gohtml.FormatBytes() does the job. I guess this will do.