Skip to content

Commit

Permalink
dev: Use fmt.Errorf instead of errors.New - merge 572071ce41835e83427…
Browse files Browse the repository at this point in the history
…7d132bd34f72baa4754cc from golang/protobuf
  • Loading branch information
awalterschulze committed Apr 6, 2018
1 parent 5028789 commit 5f21c7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proto/extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func checkExtensionTypes(pb extendableProto, extension *ExtensionDesc) error {
pbi = ea.extensionsBytes
}
if a, b := reflect.TypeOf(pbi), reflect.TypeOf(extension.ExtendedType); a != b {
return errors.New("proto: bad extended type; " + b.String() + " does not extend " + a.String())
return fmt.Errorf("proto: bad extended type; %v does not extend %v", b, a)
}
// Check the range.
if !isExtensionField(pb, extension.Field) {
Expand Down

0 comments on commit 5f21c7a

Please sign in to comment.