Update protobuf v1.2.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2019-03-20 14:47:09 +01:00
parent e16368d21f
commit 830b0294cc
92 changed files with 23196 additions and 7295 deletions

View File

@@ -184,7 +184,7 @@ func (p *union) Generate(file *generator.FileDescriptor) {
goTyp, _ := p.GoType(message, field)
obj := p.ObjectNamed(field.GetTypeName()).(*generator.Descriptor)
if gogoproto.IsUnion(obj.File(), obj.DescriptorProto) {
if gogoproto.IsUnion(obj.File().FileDescriptorProto, obj.DescriptorProto) {
p.P(`this.`, fieldname, ` = new(`, generator.GoTypeToName(goTyp), `)`)
p.P(`if set := this.`, fieldname, `.SetValue(value); set {`)
p.In()