-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
Is it an aim of protoc-gen-go
to produce names which pass golint? In particular, I find it is not capitalizing abbreviations as I expect (Id vs ID).
A contrived example is
message Args {
int64 id = 1;
string api_endpoint = 2;
}
which produces
type Args struct {
Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
ApiEndpoint string `protobuf:"bytes,2,opt,name=api_endpoint" json:"api_endpoint,omitempty"`
}
I prefer the names ID
and APIEndpoint
which pass golint. Currently, I must wrap these public fields in getters and be sure to use them to avoid propagating use of the generated names throughout my codebase.
For this project, is passing golint a goal, a loose aspiration, or no stance?
Thanks a bunch for your work on this :)
Related:
golang/lint#89
Metadata
Metadata
Assignees
Labels
No labels