all: Update protobuf package 1.0.0 -> 1.2.0 (#5452)

Also adds a few file global options to keep the generated code similar
to what we already had.
This commit is contained in:
Jakob Borg
2019-01-14 11:53:36 +01:00
committed by GitHub
parent c87411851d
commit b01edca420
132 changed files with 41655 additions and 16821 deletions

View File

@@ -157,7 +157,7 @@ func (p *gostring) Generate(file *generator.FileDescriptor) {
continue
}
p.atleastOne = true
packageName := file.PackageName()
packageName := file.GoPackageName()
ccTypeName := generator.CamelCaseSlice(message.TypeName())
p.P(`func (this *`, ccTypeName, `) GoString() string {`)
@@ -225,7 +225,7 @@ func (p *gostring) Generate(file *generator.FileDescriptor) {
p.P(`s = append(s, "`, fieldname, `: " + `, mapName, `+ ",\n")`)
p.Out()
p.P(`}`)
} else if (field.IsMessage() && !gogoproto.IsCustomType(field) && !gogoproto.IsStdTime(field) && !gogoproto.IsStdDuration(field)) || p.IsGroup(field) {
} else if (field.IsMessage() && !gogoproto.IsCustomType(field) && !gogoproto.IsStdType(field)) || p.IsGroup(field) {
if nullable || repeated {
p.P(`if this.`, fieldname, ` != nil {`)
p.In()