From ebb1566a46f2f5b2c06ef0f7ad5f7084dce0aed9 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Tue, 28 Jun 2011 09:43:14 +1000 Subject: strings.Split: make the default to split all. Change the signature of Split to have no count, assuming a full split, and rename the existing Split with a count to SplitN. Do the same to package bytes. Add a gofix module. R=adg, dsymonds, alex.brainman, rsc CC=golang-dev https://golang.org/cl/4661051 --- src/pkg/exec/exec_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pkg/exec/exec_test.go') diff --git a/src/pkg/exec/exec_test.go b/src/pkg/exec/exec_test.go index c45a7d70a6..f6cebb9055 100644 --- a/src/pkg/exec/exec_test.go +++ b/src/pkg/exec/exec_test.go @@ -55,7 +55,7 @@ func TestCatGoodAndBadFile(t *testing.T) { t.Errorf("expected Waitmsg from cat combined; got %T: %v", err, err) } s := string(bs) - sp := strings.Split(s, "\n", 2) + sp := strings.SplitN(s, "\n", 2) if len(sp) != 2 { t.Fatalf("expected two lines from cat; got %q", s) } -- cgit v1.3