mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Merge pull request #37296 from ncdc/skip-dash-in-protobuf-tags
Automatic merge from submit-queue Fix skipping - protobuf fields **What this PR does / why we need it**: fixes the protobuf generator to skip fields with a protobuf tag of `"-"` Match changes in https://github.com/kubernetes/gengo/pull/19 I couldn't get godeps to work to vendor this change in from gengo, so I made the same edits manually in cmd/libs/go2idl. A task for another day... @smarterclayton
This commit is contained in:
commit
9541c38f39
@ -630,7 +630,12 @@ func membersToFields(locator ProtobufLocator, t *types.Type, localPackage types.
|
||||
Extras: make(map[string]string),
|
||||
}
|
||||
|
||||
if err := protobufTagToField(tags.Get("protobuf"), &field, m, t, localPackage); err != nil {
|
||||
protobufTag := tags.Get("protobuf")
|
||||
if protobufTag == "-" {
|
||||
continue
|
||||
}
|
||||
|
||||
if err := protobufTagToField(protobufTag, &field, m, t, localPackage); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user