diff --git a/profile/proto.go b/profile/proto.go index 5c67c60126..539ad3ab33 100644 --- a/profile/proto.go +++ b/profile/proto.go @@ -33,7 +33,10 @@ package profile -import "errors" +import ( + "errors" + "fmt" +) type buffer struct { field int // field tag @@ -235,7 +238,7 @@ func decodeField(b *buffer, data []byte) ([]byte, error) { b.u64 = uint64(le32(data[:4])) data = data[4:] default: - return nil, errors.New("unknown wire type: " + string(rune(b.typ))) + return nil, fmt.Errorf("unknown wire type: %d", b.typ) } return data, nil