mirror of
https://github.com/golang/go
synced 2024-11-25 01:08:02 -07:00
encoding/binary: fix typo: ReadVarint returns an int64, not a uint64.
R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/6432062
This commit is contained in:
parent
3a112a8112
commit
614cb3b8dd
@ -123,7 +123,7 @@ func ReadUvarint(r io.ByteReader) (uint64, error) {
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
// ReadVarint reads an encoded unsigned integer from r and returns it as a uint64.
|
||||
// ReadVarint reads an encoded unsigned integer from r and returns it as an int64.
|
||||
func ReadVarint(r io.ByteReader) (int64, error) {
|
||||
ux, err := ReadUvarint(r) // ok to continue in presence of error
|
||||
x := int64(ux >> 1)
|
||||
|
Loading…
Reference in New Issue
Block a user