From 9ac4449cb2bf8fa1fc414a9cbc67c5a46af8ea51 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 20 Nov 2009 11:45:05 -0800 Subject: gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit R=r, gri CC=golang-dev https://golang.org/cl/156115 --- src/pkg/encoding/binary/binary.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/pkg/encoding/binary/binary.go') 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()) } -- cgit v1.3-5-g9baa