1
0
mirror of https://github.com/golang/go synced 2024-11-21 23:24:41 -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:
Patrick Mylund Nielsen 2012-07-22 10:26:32 +10:00 committed by David Symonds
parent 3a112a8112
commit 614cb3b8dd

View File

@ -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)