protobuf: remove generated google/rpc files
We move from having our own generated version of the googleapis files to an upstream version that is present in gogo. As part of this, we update the protobuf package to 1.0 and make some corrections for slight differences in the generated code. The impact of this change is very low. Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
38
vendor/github.com/gogo/protobuf/plugin/equal/equal.go
generated
vendored
38
vendor/github.com/gogo/protobuf/plugin/equal/equal.go
generated
vendored
@@ -107,10 +107,7 @@ given to the equal plugin, will generate the following code:
|
||||
|
||||
func (this *B) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*B)
|
||||
@@ -118,10 +115,7 @@ given to the equal plugin, will generate the following code:
|
||||
return false
|
||||
}
|
||||
if that1 == nil {
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -236,19 +230,15 @@ func (p *plugin) generateNullableField(fieldname string, verbose bool) {
|
||||
func (p *plugin) generateMsgNullAndTypeCheck(ccTypeName string, verbose bool) {
|
||||
p.P(`if that == nil {`)
|
||||
p.In()
|
||||
p.P(`if this == nil {`)
|
||||
p.In()
|
||||
if verbose {
|
||||
p.P(`if this == nil {`)
|
||||
p.In()
|
||||
p.P(`return nil`)
|
||||
} else {
|
||||
p.P(`return true`)
|
||||
}
|
||||
p.Out()
|
||||
p.P(`}`)
|
||||
if verbose {
|
||||
p.Out()
|
||||
p.P(`}`)
|
||||
p.P(`return `, p.fmtPkg.Use(), `.Errorf("that == nil && this != nil")`)
|
||||
} else {
|
||||
p.P(`return false`)
|
||||
p.P(`return this == nil`)
|
||||
}
|
||||
p.Out()
|
||||
p.P(`}`)
|
||||
@@ -274,19 +264,15 @@ func (p *plugin) generateMsgNullAndTypeCheck(ccTypeName string, verbose bool) {
|
||||
p.P(`}`)
|
||||
p.P(`if that1 == nil {`)
|
||||
p.In()
|
||||
p.P(`if this == nil {`)
|
||||
p.In()
|
||||
if verbose {
|
||||
p.P(`if this == nil {`)
|
||||
p.In()
|
||||
p.P(`return nil`)
|
||||
} else {
|
||||
p.P(`return true`)
|
||||
}
|
||||
p.Out()
|
||||
p.P(`}`)
|
||||
if verbose {
|
||||
p.Out()
|
||||
p.P(`}`)
|
||||
p.P(`return `, p.fmtPkg.Use(), `.Errorf("that is type *`, ccTypeName, ` but is nil && this != nil")`)
|
||||
} else {
|
||||
p.P(`return false`)
|
||||
p.P(`return this == nil`)
|
||||
}
|
||||
p.Out()
|
||||
p.P(`} else if this == nil {`)
|
||||
|
||||
Reference in New Issue
Block a user