From e40fdffc13a7dd93c54c8cc00e2173b4d382a620 Mon Sep 17 00:00:00 2001 From: Patrick Mylund Nielsen Date: Sat, 22 Sep 2012 05:54:10 +1000 Subject: [PATCH] [release-branch.go1] encoding/binary: fix typo: ReadVarint returns an int64, not a uint64. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ««« backport 2f39e6389d55 encoding/binary: fix typo: ReadVarint returns an int64, not a uint64. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/6432062 »»» --- src/pkg/encoding/binary/varint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/encoding/binary/varint.go b/src/pkg/encoding/binary/varint.go index b756afdd04..719018b603 100644 --- a/src/pkg/encoding/binary/varint.go +++ b/src/pkg/encoding/binary/varint.go @@ -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) -- 2.50.0