Run go fmt before writing to file
yasv98 opened this issue · 4 comments
yasv98 commented
It would be good if generator.go
could run go fmt on the code lines before writing to file. This would prevent having to add a go:generate go fmt _filename_.go
as part of the generate commands or having the generated output fail lint checks.
I've made this change in a forked version of the repository here which could be a way to add this change. It changes the writeFile
function to format the code lines before writing to a file.
yujiachen-y commented
@yasv98 thank you for your suggestion! I hadn't incorporated the formatting functionality because I typically format the code manually. I will address the issue soon.
yujiachen-y commented
yujiachen-y commented
yasv98 commented
Thanks!