Hacker News new | ask | show | jobs
by jbub 1622 days ago
The standard way to check for these was https://github.com/mdempsky/maligned.

It is now deprecated in favour of https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/fie....

You can now check for these using go vet:

    go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@latest
    go vet -vettool=$(which fieldalignment) ./...
1 comments

Thanks ! That's nice to know !