-
Notifications
You must be signed in to change notification settings - Fork 807
Open
Description
for example, here's the protobuf:
syntax="proto3";
package hello;
...
message HelloRequest {
// xxx111
string msg = 1; // xxx222
}
Then execute the: protoc --gogofast_out=. hello.proto, the generated code is:
type HelloRequest struct {
// xxx111
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
We could see, the trailing comments is not generated, while protoc-gen-go will handle both the leading and trailing comments. Please support this style of trailing comments.
This style of trailing comments will help align the fields, much clearer. It will improve readability. I won't have to switch between the *.pb.go and *.proto file.
Metadata
Metadata
Assignees
Labels
No labels