3 ms·
There are tools for Go that detect non-optimal struct alignment. I use golangci-lint, available at: https://github.com/golangci/golangci-lint https://github.com
by oofabz 5y ago
There are tools for Go that detect non-optimal struct alignment. I use golangci-lint, available at:
https://github.com/golangci/golangci-lint https://github.com/golangci/golangci-lint
The struct alignment linter is not included by default. To enable it, run the linter with this command:
golangci-lint run --enable maligned
- dgellow 5y agoIf you, the person reading this comment, write Go without golangci-lint, you’re really missing something. It’s fast, easy to use, and makes Go programming so much nicer and safer!
- bstpierre 5y agoAlso, don’t let the name mislead you — it’s not just for CI jobs, it’s great to use all the time.
- everybodyknows 5y ago> go get installation aren't guaranteed to work. We recommend using binary installation. The page goes on to list several difficulties with go get of the sort that suggest fundamental design flaws. Anyone have experience with this?
- icholy 5y agohttps://github.com/golang/go/issues/44840 https://github.com/golang/go/issues/44840