/ go Public
x/tools/gopls: field alignment warning has issues on custom types #47055
Issues related to the Go language server, gopls.
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
This label describes issues relating to any tools in the x/tools repository.
What version of Go are you using (
What operating system and processor architecture are you using (
What did you do?
Have a struct with a custom type, for example
What did you see?
struct of size 72 could be 64
What did you expect to see instead?
No warning, since that same exact struct passes with https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/fieldalignment.
The warning also disappears if I replace my custom type with
From my understanding, this issue only applied to types outside the standard library, since I get the issue on all the structs that contains custom types, either mines or from imported packages, such as https://github.com/shopspring/decimal's decimal.Decimal
The text was updated successfully, but these errors were encountered: