Is your feature request related to a problem? Please describe.
I'm always frustrated when generated Go files do not adhere to Go's formatting standards, leading to inconsistent code style across the codebase. This requires developers to manually run gofmt before committing, or reviewers to point out formatting issues. It's an unnecessary overhead that slows down the development process and makes the code less readable until it’s formatted.
Describe the solution you'd like
I would like the code generation process to automatically apply gofmt to all generated Go files. This will ensure that generated files are always properly formatted without requiring manual intervention.
Describe alternatives you've considered
Adding a pre-commit hook to format Go files before committing. While this helps, it still doesn’t solve the root problem of automating the formatting at the generation step itself.
Additional context
Automating gofmt during file generation will streamline the development workflow, reduce the chances of formatting issues during code reviews, and ensure consistency across the project.
Is your feature request related to a problem? Please describe.
I'm always frustrated when generated Go files do not adhere to Go's formatting standards, leading to inconsistent code style across the codebase. This requires developers to manually run
gofmt
before committing, or reviewers to point out formatting issues. It's an unnecessary overhead that slows down the development process and makes the code less readable until it’s formatted.Describe the solution you'd like
I would like the code generation process to automatically apply
gofmt
to all generated Go files. This will ensure that generated files are always properly formatted without requiring manual intervention.Describe alternatives you've considered
Additional context
Automating
gofmt
during file generation will streamline the development workflow, reduce the chances of formatting issues during code reviews, and ensure consistency across the project.References:
gofmt
documentation