]> Cypherpunks repositories - gostls13.git/commit
gofmt: simplify slices of the form s[a : len(s)] to s[a:]
authorRobert Griesemer <gri@golang.org>
Wed, 31 Oct 2012 18:48:55 +0000 (11:48 -0700)
committerRobert Griesemer <gri@golang.org>
Wed, 31 Oct 2012 18:48:55 +0000 (11:48 -0700)
commit0cbca268d8aba5d7ffb24be58ea1ea92fcd5f6f5
treec2308484859e0ca50256a372a14f5e9acdb4b5b1
parentc15afa887a038a3f4c70f1e38aac31084ee9f846
gofmt: simplify slices of the form s[a : len(s)] to s[a:]

Fixes #4314.

R=r, rsc
CC=golang-dev
https://golang.org/cl/6822059
src/cmd/gofmt/gofmt_test.go
src/cmd/gofmt/simplify.go
src/cmd/gofmt/testdata/slices1.golden [new file with mode: 0644]
src/cmd/gofmt/testdata/slices1.input [new file with mode: 0644]
src/cmd/gofmt/testdata/slices2.golden [new file with mode: 0644]
src/cmd/gofmt/testdata/slices2.input [new file with mode: 0644]