There are tools for Go that detect non-optimal struct alignment. I use golangci-lint, available at:
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