From: Scott Lawrence Date: Mon, 13 Sep 2010 02:59:59 +0000 (+1000) Subject: goinstall: warn when http:// is found at beginning of package name X-Git-Tag: weekly.2010-09-15~28 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=25c8d4e932375fb1b34352c166223987c7f44117;p=gostls13.git goinstall: warn when http:// is found at beginning of package name Fixes #860. R=golang-dev, adg1, rsc, adg CC=golang-dev https://golang.org/cl/2124046 --- diff --git a/src/cmd/goinstall/main.go b/src/cmd/goinstall/main.go index 2d410cd4fc..07ab622af0 100644 --- a/src/cmd/goinstall/main.go +++ b/src/cmd/goinstall/main.go @@ -148,6 +148,11 @@ func install(pkg, parent string) { // If remote, download or update it. var dir string local := false + if strings.HasPrefix(pkg, "http://") { + fmt.Fprintf(os.Stderr, "%s: %s: 'http://' used in remote path, try '%s'\n", argv0, pkg, pkg[7:]) + errors = true + return + } if isLocalPath(pkg) { dir = pkg local = true