You can read this article to know more about performance improvement on golang structs.
This linter helps you find (and fix) the ordering issues of your golang structs fields.
go install github.com/majidalaeinia/lintstructpadding@latestsudo mv $(go env GOPATH)/bin/lintstructpadding /usr/binlintstructpadding /path/to/a/singlefile.gocd /path/to/your/source/code
lintstructpaddinglintstructpadding --fix /path/to/a/singlefile.gocd /path/to/your/source/code
lintstructpadding --fix- Add tests
- Remove blank lines on struct fixing
- Improve README file with a terminal GIF showing what it does
- Improve installation