Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1370)

Unified Diff: src/cmd/goinstall/download.go

Issue 4661051: code review 4661051: strings.Split: make the default to split all. (Closed)
Patch Set: diff -r eaa696629d4d https://go.googlecode.com/hg/ Created 12 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/cmd/gofmt/rewrite.go ('k') | src/cmd/govet/govet.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/goinstall/download.go
===================================================================
--- a/src/cmd/goinstall/download.go
+++ b/src/cmd/goinstall/download.go
@@ -146,11 +146,11 @@
// 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
}
« no previous file with comments | « src/cmd/gofmt/rewrite.go ('k') | src/cmd/govet/govet.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b