allow to use fieldaligment with own golang code

74 views
Skip to first unread message

Vasiliy Tolstov

unread,
Dec 4, 2021, 4:02:17 PM12/4/21
to golang-nuts
I want to use fieldaligment in own code (mostly i want to align automatic struct fields in generated code).
Also i want to reformat generated protobuf code via own tool.
I can run fieldaligment.Analyzer but can't set -fix flag because it provided in internal package

go/analysis/internal/checker/checker.go


i'm also create golang protobuf issue about field alignment because sometimes generated structs have 3x memory usage vs properly aligned struct.


What can you suggests ? I don't think that golang protobuf devs fix this in near feature.. or i'm wrong?


Vasiliy Tolstov,
e-mail: v.to...@selfip.ru
Reply all
Reply to author
Forward
0 new messages