You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment for field alignment and I'm having very bad moments reading my structs because I have this:
ianlancetaylor
changed the title
proposal: fieldalignment at compile time with a simple flag
proposal: cmd/compile: flag to set field alignment
Jan 26, 2022
In general we don't use the issue tracker for questions or discussion. Questions get answered faster and more accurately on forums. See https://golang.org/wiki/Questions.
I'm using
golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment
for field alignment and I'm having very bad moments reading my structs because I have this:instead for example of this:
which is faster and clearer to read and understand for me.
PROPOSAL
Can we have some sort of build flag at compile time to apply
fieldalignment
on each struct in our project?Something like:
go build --fieldalignment .
It would be very welcome and simple to realize I think.
Sorry if I wrote the proposal wrong.
The text was updated successfully, but these errors were encountered: