mirror of
https://github.com/golang/go
synced 2024-11-18 05:44:47 -07:00
encoding/binary: improve comment formatting consistency
Use 2 slashes, space, then tab. This is more consistent, and removes inadvertent leading space. Change-Id: I383770ed4eb8ac17c78c7ae5675b553d4fb70b1e Reviewed-on: https://go-review.googlesource.com/46726 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
441fd13386
commit
7f93232a10
@ -53,9 +53,9 @@ func PutUvarint(buf []byte, x uint64) int {
|
||||
// number of bytes read (> 0). If an error occurred, the value is 0
|
||||
// and the number of bytes n is <= 0 meaning:
|
||||
//
|
||||
// n == 0: buf too small
|
||||
// n < 0: value larger than 64 bits (overflow)
|
||||
// and -n is the number of bytes read
|
||||
// n == 0: buf too small
|
||||
// n < 0: value larger than 64 bits (overflow)
|
||||
// and -n is the number of bytes read
|
||||
//
|
||||
func Uvarint(buf []byte) (uint64, int) {
|
||||
var x uint64
|
||||
@ -87,9 +87,9 @@ func PutVarint(buf []byte, x int64) int {
|
||||
// number of bytes read (> 0). If an error occurred, the value is 0
|
||||
// and the number of bytes n is <= 0 with the following meaning:
|
||||
//
|
||||
// n == 0: buf too small
|
||||
// n < 0: value larger than 64 bits (overflow)
|
||||
// and -n is the number of bytes read
|
||||
// n == 0: buf too small
|
||||
// n < 0: value larger than 64 bits (overflow)
|
||||
// and -n is the number of bytes read
|
||||
//
|
||||
func Varint(buf []byte) (int64, int) {
|
||||
ux, n := Uvarint(buf) // ok to continue in presence of error
|
||||
|
Loading…
Reference in New Issue
Block a user