From c861f30835090bbd6b9b35a80667f26952843767 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 http://codereview.appspot.com/156115 --- src/pkg/encoding/ascii85/ascii85.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/pkg/encoding/ascii85/ascii85.go') diff --git a/src/pkg/encoding/ascii85/ascii85.go b/src/pkg/encoding/ascii85/ascii85.go index ba70f3dea..85f688b2f 100644 --- a/src/pkg/encoding/ascii85/ascii85.go +++ b/src/pkg/encoding/ascii85/ascii85.go @@ -57,7 +57,7 @@ func Encode(dst, src []byte) int { // Special case: zero (!!!!!) shortens to z. if v == 0 && len(src) >= 4 { dst[0] = 'z'; - dst = dst[1:len(dst)]; + dst = dst[1:]; n++; continue; } @@ -74,9 +74,9 @@ func Encode(dst, src []byte) int { m -= 4 - len(src); src = nil; } else { - src = src[4:len(src)] + src = src[4:] } - dst = dst[m:len(dst)]; + dst = dst[m:]; n += m; } return n; @@ -113,7 +113,7 @@ func (e *encoder) Write(p []byte) (n int, err os.Error) { e.nbuf++; } n += i; - p = p[i:len(p)]; + p = p[i:]; if e.nbuf < 4 { return } @@ -138,7 +138,7 @@ func (e *encoder) Write(p []byte) (n int, err os.Error) { } } n += nn; - p = p[nn:len(p)]; + p = p[nn:]; } // Trailing fringe. @@ -268,7 +268,7 @@ func (d *decoder) Read(p []byte) (n int, err os.Error) { // Copy leftover output from last decode. if len(d.out) > 0 { n = copy(p, d.out); - d.out = d.out[n:len(d.out)]; + d.out = d.out[n:]; return; } @@ -293,7 +293,7 @@ func (d *decoder) Read(p []byte) (n int, err os.Error) { } // Read more data. - nn, d.readErr = d.r.Read(d.buf[d.nbuf:len(d.buf)]); + nn, d.readErr = d.r.Read(d.buf[d.nbuf:]); d.nbuf += nn; } panic("unreachable"); -- cgit v1.2.3