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 | c861f30835090bbd6b9b35a80667f26952843767 (patch) | |
| tree | 645bd57ef3c9326ec02e646a751b9075d12a79e7 /src/pkg/encoding/binary/binary.go | |
| parent | 7089e97992d5d6be520dfea787200061992526c8 (diff) | |
| download | golang-c861f30835090bbd6b9b35a80667f26952843767.tar.gz | |
gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg
R=r, gri
CC=golang-dev
http://codereview.appspot.com/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 92c89cea9..f3cc8584a 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()) } |
