diff options
| author | Russ Cox <rsc@golang.org> | 2009-11-20 11:45:05 -0800 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2009-11-20 11:45:05 -0800 |
| commit | 9ac4449cb2bf8fa1fc414a9cbc67c5a46af8ea51 (patch) | |
| tree | 41ba750b1ae6464558f8f8bb4871c5233f35924b /src/pkg/encoding/binary/binary.go | |
| parent | aa4c638b7baf1f3a0e0fd3ab10bd7c8de74869b9 (diff) | |
| download | go-9ac4449cb2bf8fa1fc414a9cbc67c5a46af8ea51.tar.xz | |
gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg
R=r, gri
CC=golang-dev
https://golang.org/cl/156115
Diffstat (limited to 'src/pkg/encoding/binary/binary.go')
| -rw-r--r-- | src/pkg/encoding/binary/binary.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/pkg/encoding/binary/binary.go b/src/pkg/encoding/binary/binary.go index 92c89cea97..f3cc8584a8 100644 --- a/src/pkg/encoding/binary/binary.go +++ b/src/pkg/encoding/binary/binary.go @@ -210,46 +210,46 @@ type encoder struct { func (d *decoder) uint8() uint8 { x := d.buf[0]; - d.buf = d.buf[1:len(d.buf)]; + d.buf = d.buf[1:]; return x; } func (e *encoder) uint8(x uint8) { e.buf[0] = x; - e.buf = e.buf[1:len(e.buf)]; + e.buf = e.buf[1:]; } func (d *decoder) uint16() uint16 { x := d.order.Uint16(d.buf[0:2]); - d.buf = d.buf[2:len(d.buf)]; + d.buf = d.buf[2:]; return x; } func (e *encoder) uint16(x uint16) { e.order.PutUint16(e.buf[0:2], x); - e.buf = e.buf[2:len(e.buf)]; + e.buf = e.buf[2:]; } func (d *decoder) uint32() uint32 { x := d.order.Uint32(d.buf[0:4]); - d.buf = d.buf[4:len(d.buf)]; + d.buf = d.buf[4:]; return x; } func (e *encoder) uint32(x uint32) { e.order.PutUint32(e.buf[0:4], x); - e.buf = e.buf[4:len(e.buf)]; + e.buf = e.buf[4:]; } func (d *decoder) uint64() uint64 { x := d.order.Uint64(d.buf[0:8]); - d.buf = d.buf[8:len(d.buf)]; + d.buf = d.buf[8:]; return x; } func (e *encoder) uint64(x uint64) { e.order.PutUint64(e.buf[0:8], x); - e.buf = e.buf[8:len(e.buf)]; + e.buf = e.buf[8:]; } func (d *decoder) int8() int8 { return int8(d.uint8()) } |
