Skip to content

Commit e581f92

Browse files
committed
proto: deprecate ErrInternalBadWireType
Nothing uses this error. Change-Id: I30e94c2b6f3c7865c40d8536d371c7e04b5af908 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/167040 Reviewed-by: Herbie Ong <[email protected]>
1 parent d210aa8 commit e581f92

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

proto/decode.go

-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ import (
1717
// errOverflow is returned when an integer is too large to be represented.
1818
var errOverflow = errors.New("proto: integer overflow")
1919

20-
// ErrInternalBadWireType is returned by generated code when an incorrect
21-
// wire type is encountered. It does not get returned to user code.
22-
var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof")
23-
2420
// DecodeVarint reads a varint-encoded integer from the slice.
2521
// It returns the integer and the number of bytes consumed, or
2622
// zero if there is not enough.

proto/deprecated.go

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import (
1010
"github.com/golang/protobuf/protoapi"
1111
)
1212

13+
// Deprecated: do not use.
14+
var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof")
15+
1316
// Deprecated: do not use.
1417
type Stats struct{ Emalloc, Dmalloc, Encode, Decode, Chit, Cmiss, Size uint64 }
1518

0 commit comments

Comments
 (0)