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
This commit is contained in:
Rob Pike 2011-06-28 09:43:14 +10:00
parent 82a8afdf14
commit ebb1566a46
60 changed files with 296 additions and 120 deletions

View file

@ -52,7 +52,7 @@ func stack() []byte {
if err != nil {
continue
}
lines = bytes.Split(data, []byte{'\n'}, -1)
lines = bytes.Split(data, []byte{'\n'})
lastFile = file
}
line-- // in stack trace, lines are 1-indexed but our array is 0-indexed