diff --git a/cmd/go2proto/testdata/go2proto.to.go b/cmd/go2proto/testdata/go2proto.to.go index 7bb114693..8afb9c535 100644 --- a/cmd/go2proto/testdata/go2proto.to.go +++ b/cmd/go2proto/testdata/go2proto.to.go @@ -147,7 +147,7 @@ func (x *Root) ToProto() *destpb.Root { RepeatedMsg: protoSlice[*destpb.Message](x.RepeatedMsg), Url: protoMust(x.URL.MarshalBinary()), Key: string(protoMust(x.Key.MarshalText())), - ExternalRoot: x.ExternalRoot.ToProto(), + ExternalRoot: string(protoMust(x.ExternalRoot.MarshalText())), } } @@ -184,10 +184,8 @@ func RootFromProto(v *destpb.Root) (out *Root, err error) { if err = out.Key.UnmarshalText([]byte(v.Key)); err != nil { return nil, fmt.Errorf("Key: %w", err) } - if fieldExternalRoot, err := RootFromProto(v.ExternalRoot); err != nil { + if err = out.ExternalRoot.UnmarshalText([]byte(v.ExternalRoot)); err != nil { return nil, fmt.Errorf("ExternalRoot: %w", err) - } else { - out.ExternalRoot = fromPtr(fieldExternalRoot) } return out, nil } diff --git a/cmd/go2proto/testdata/testdatapb/model.pb.go b/cmd/go2proto/testdata/testdatapb/model.pb.go index 8ff4e5a36..da06dab46 100644 --- a/cmd/go2proto/testdata/testdatapb/model.pb.go +++ b/cmd/go2proto/testdata/testdatapb/model.pb.go @@ -196,7 +196,7 @@ type Root struct { RepeatedMsg []*Message `protobuf:"bytes,11,rep,name=repeated_msg,json=repeatedMsg,proto3" json:"repeated_msg,omitempty"` Url []byte `protobuf:"bytes,12,opt,name=url,proto3" json:"url,omitempty"` Key string `protobuf:"bytes,13,opt,name=key,proto3" json:"key,omitempty"` - ExternalRoot *Root `protobuf:"bytes,14,opt,name=external_root,json=externalRoot,proto3" json:"external_root,omitempty"` + ExternalRoot string `protobuf:"bytes,14,opt,name=external_root,json=externalRoot,proto3" json:"external_root,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -315,11 +315,11 @@ func (x *Root) GetKey() string { return "" } -func (x *Root) GetExternalRoot() *Root { +func (x *Root) GetExternalRoot() string { if x != nil { return x.ExternalRoot } - return nil + return "" } type SubSumType struct { @@ -778,7 +778,7 @@ var file_model_proto_rawDesc = []byte{ 0x6f, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x06, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x22, 0x20, 0x0a, 0x06, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x22, 0xa3, 0x05, 0x0a, 0x04, 0x52, 0x6f, 0x6f, 0x74, + 0x06, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x22, 0x80, 0x05, 0x0a, 0x04, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x69, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x65, @@ -812,60 +812,58 @@ var file_model_proto_rawDesc = []byte{ 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0b, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, + 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, - 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, + 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, + 0x6f, 0x6f, 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x5f, 0x69, 0x6e, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x70, 0x74, 0x72, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x6d, 0x73, 0x67, 0x22, 0x89, 0x01, 0x0a, 0x0a, 0x53, + 0x75, 0x62, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x01, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x67, 0x6f, 0x32, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x65, + 0x73, 0x74, 0x2e, 0x53, 0x75, 0x62, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x41, 0x48, 0x00, + 0x52, 0x01, 0x61, 0x12, 0x38, 0x0a, 0x01, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x67, + 0x6f, 0x32, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x75, 0x62, + 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x42, 0x48, 0x00, 0x52, 0x01, 0x62, 0x42, 0x07, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1b, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x53, 0x75, 0x6d, + 0x54, 0x79, 0x70, 0x65, 0x41, 0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x01, 0x61, 0x22, 0x1b, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, + 0x65, 0x42, 0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x61, + 0x22, 0xd9, 0x02, 0x0a, 0x07, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4f, 0x0a, 0x0e, + 0x73, 0x75, 0x62, 0x5f, 0x73, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x61, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x67, 0x6f, 0x32, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x65, + 0x73, 0x74, 0x2e, 0x53, 0x75, 0x62, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x41, 0x48, 0x00, + 0x52, 0x0b, 0x73, 0x75, 0x62, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x41, 0x12, 0x4f, 0x0a, + 0x0e, 0x73, 0x75, 0x62, 0x5f, 0x73, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x62, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x67, 0x6f, 0x32, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, - 0x65, 0x73, 0x74, 0x2e, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x52, 0x6f, 0x6f, 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x70, 0x74, 0x72, 0x42, 0x0f, 0x0a, 0x0d, - 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x6d, 0x73, 0x67, 0x22, 0x89, 0x01, - 0x0a, 0x0a, 0x53, 0x75, 0x62, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x01, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, + 0x65, 0x73, 0x74, 0x2e, 0x53, 0x75, 0x62, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x42, 0x48, + 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x42, 0x12, 0x35, + 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x67, 0x6f, 0x32, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x41, + 0x48, 0x00, 0x52, 0x01, 0x61, 0x12, 0x35, 0x0a, 0x01, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, + 0x2e, 0x67, 0x6f, 0x32, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x53, + 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x42, 0x48, 0x00, 0x52, 0x01, 0x62, 0x12, 0x35, 0x0a, 0x01, + 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x67, 0x6f, 0x32, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x75, 0x62, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, - 0x41, 0x48, 0x00, 0x52, 0x01, 0x61, 0x12, 0x38, 0x0a, 0x01, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, - 0x6c, 0x2e, 0x67, 0x6f, 0x32, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, - 0x53, 0x75, 0x62, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x42, 0x48, 0x00, 0x52, 0x01, 0x62, - 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1b, 0x0a, 0x0b, 0x53, 0x75, 0x62, + 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x43, 0x48, 0x00, + 0x52, 0x01, 0x63, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x18, 0x0a, 0x08, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x41, 0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x01, 0x61, 0x22, 0x1b, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x53, 0x75, 0x6d, - 0x54, 0x79, 0x70, 0x65, 0x42, 0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x01, 0x61, 0x22, 0xd9, 0x02, 0x0a, 0x07, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x4f, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x5f, 0x73, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, - 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x67, 0x6f, 0x32, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x75, 0x62, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, - 0x41, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x41, - 0x12, 0x4f, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x5f, 0x73, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x5f, 0x62, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x67, 0x6f, 0x32, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x75, 0x62, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, - 0x65, 0x42, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, - 0x42, 0x12, 0x35, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x78, - 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x67, 0x6f, 0x32, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x75, 0x6d, 0x54, 0x79, - 0x70, 0x65, 0x41, 0x48, 0x00, 0x52, 0x01, 0x61, 0x12, 0x35, 0x0a, 0x01, 0x62, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x66, 0x74, 0x6c, 0x2e, 0x67, 0x6f, 0x32, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x65, 0x73, - 0x74, 0x2e, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x42, 0x48, 0x00, 0x52, 0x01, 0x62, 0x12, - 0x35, 0x0a, 0x01, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x78, 0x79, 0x7a, - 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x67, 0x6f, 0x32, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, - 0x43, 0x48, 0x00, 0x52, 0x01, 0x63, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0x18, 0x0a, 0x08, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x41, 0x12, 0x0c, 0x0a, 0x01, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x61, 0x22, 0x18, 0x0a, 0x08, 0x53, 0x75, 0x6d, - 0x54, 0x79, 0x70, 0x65, 0x42, 0x12, 0x0c, 0x0a, 0x01, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x01, 0x62, 0x22, 0x18, 0x0a, 0x08, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x43, 0x12, - 0x0c, 0x0a, 0x01, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x01, 0x63, 0x2a, 0x1e, 0x0a, - 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x41, 0x10, - 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x42, 0x10, 0x01, 0x42, 0x37, 0x5a, - 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x67, 0x6f, 0x32, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x65, 0x73, 0x74, - 0x64, 0x61, 0x74, 0x61, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x01, 0x28, 0x09, 0x52, 0x01, 0x61, 0x22, 0x18, 0x0a, 0x08, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, + 0x65, 0x42, 0x12, 0x0c, 0x0a, 0x01, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x01, 0x62, + 0x22, 0x18, 0x0a, 0x08, 0x53, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x43, 0x12, 0x0c, 0x0a, 0x01, + 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x01, 0x63, 0x2a, 0x1e, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x41, 0x10, 0x00, 0x12, 0x0a, + 0x0a, 0x06, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x42, 0x10, 0x01, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x66, + 0x74, 0x6c, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x67, 0x6f, 0x32, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, + 0x61, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -906,19 +904,18 @@ var file_model_proto_depIdxs = []int32{ 7, // 5: xyz.block.ftl.go2proto.test.Root.sum_type:type_name -> xyz.block.ftl.go2proto.test.SumType 1, // 6: xyz.block.ftl.go2proto.test.Root.optional_msg:type_name -> xyz.block.ftl.go2proto.test.Message 1, // 7: xyz.block.ftl.go2proto.test.Root.repeated_msg:type_name -> xyz.block.ftl.go2proto.test.Message - 3, // 8: xyz.block.ftl.go2proto.test.Root.external_root:type_name -> xyz.block.ftl.go2proto.test.Root - 5, // 9: xyz.block.ftl.go2proto.test.SubSumType.a:type_name -> xyz.block.ftl.go2proto.test.SubSumTypeA - 6, // 10: xyz.block.ftl.go2proto.test.SubSumType.b:type_name -> xyz.block.ftl.go2proto.test.SubSumTypeB - 5, // 11: xyz.block.ftl.go2proto.test.SumType.sub_sum_type_a:type_name -> xyz.block.ftl.go2proto.test.SubSumTypeA - 6, // 12: xyz.block.ftl.go2proto.test.SumType.sub_sum_type_b:type_name -> xyz.block.ftl.go2proto.test.SubSumTypeB - 8, // 13: xyz.block.ftl.go2proto.test.SumType.a:type_name -> xyz.block.ftl.go2proto.test.SumTypeA - 9, // 14: xyz.block.ftl.go2proto.test.SumType.b:type_name -> xyz.block.ftl.go2proto.test.SumTypeB - 10, // 15: xyz.block.ftl.go2proto.test.SumType.c:type_name -> xyz.block.ftl.go2proto.test.SumTypeC - 16, // [16:16] is the sub-list for method output_type - 16, // [16:16] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name + 5, // 8: xyz.block.ftl.go2proto.test.SubSumType.a:type_name -> xyz.block.ftl.go2proto.test.SubSumTypeA + 6, // 9: xyz.block.ftl.go2proto.test.SubSumType.b:type_name -> xyz.block.ftl.go2proto.test.SubSumTypeB + 5, // 10: xyz.block.ftl.go2proto.test.SumType.sub_sum_type_a:type_name -> xyz.block.ftl.go2proto.test.SubSumTypeA + 6, // 11: xyz.block.ftl.go2proto.test.SumType.sub_sum_type_b:type_name -> xyz.block.ftl.go2proto.test.SubSumTypeB + 8, // 12: xyz.block.ftl.go2proto.test.SumType.a:type_name -> xyz.block.ftl.go2proto.test.SumTypeA + 9, // 13: xyz.block.ftl.go2proto.test.SumType.b:type_name -> xyz.block.ftl.go2proto.test.SumTypeB + 10, // 14: xyz.block.ftl.go2proto.test.SumType.c:type_name -> xyz.block.ftl.go2proto.test.SumTypeC + 15, // [15:15] is the sub-list for method output_type + 15, // [15:15] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name } func init() { file_model_proto_init() } diff --git a/cmd/go2proto/testdata/testdatapb/model.proto b/cmd/go2proto/testdata/testdatapb/model.proto index c14571ece..91af49ddc 100644 --- a/cmd/go2proto/testdata/testdatapb/model.proto +++ b/cmd/go2proto/testdata/testdatapb/model.proto @@ -37,7 +37,7 @@ message Root { repeated Message repeated_msg = 11; bytes url = 12; string key = 13; - Root external_root = 14; + string external_root = 14; }