diff options
| author | Rob Pike <r@golang.org> | 2011-06-28 09:43:14 +1000 |
|---|---|---|
| committer | Rob Pike <r@golang.org> | 2011-06-28 09:43:14 +1000 |
| commit | ebb1566a46f2f5b2c06ef0f7ad5f7084dce0aed9 (patch) | |
| tree | 62c412f896baa504ae4a26d452f8cac6ce1aeed8 /src/cmd/goinstall | |
| parent | 82a8afdf1411bbe5b08b09d1e94a8d1c4fb5635c (diff) | |
| download | go-ebb1566a46f2f5b2c06ef0f7ad5f7084dce0aed9.tar.xz | |
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
Diffstat (limited to 'src/cmd/goinstall')
| -rw-r--r-- | src/cmd/goinstall/download.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/goinstall/download.go b/src/cmd/goinstall/download.go index d209fa82bf..129c0459a6 100644 --- a/src/cmd/goinstall/download.go +++ b/src/cmd/goinstall/download.go @@ -146,11 +146,11 @@ var vcsList = []*vcs{&git, &hg, &bzr, &svn} // hostname - i.e. contains at least one '.' and the last part is at least 2 // characters. func isRemote(pkg string) bool { - parts := strings.Split(pkg, "/", 2) + parts := strings.SplitN(pkg, "/", 2) if len(parts) != 2 { return false } - parts = strings.Split(parts[0], ".", -1) + parts = strings.Split(parts[0], ".") if len(parts) < 2 || len(parts[len(parts)-1]) < 2 { return false } |
