mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
82a8afdf14
commit
ebb1566a46
60 changed files with 296 additions and 120 deletions
|
|
@ -287,7 +287,7 @@ func parseCpuList() {
|
|||
if len(*cpuListStr) == 0 {
|
||||
cpuList = append(cpuList, runtime.GOMAXPROCS(-1))
|
||||
} else {
|
||||
for _, val := range strings.Split(*cpuListStr, ",", -1) {
|
||||
for _, val := range strings.Split(*cpuListStr, ",") {
|
||||
cpu, err := strconv.Atoi(val)
|
||||
if err != nil || cpu <= 0 {
|
||||
println("invalid value for -test.cpu")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue