From 25c8d4e932375fb1b34352c166223987c7f44117 Mon Sep 17 00:00:00 2001 From: Scott Lawrence Date: Mon, 13 Sep 2010 12:59:59 +1000 Subject: [PATCH] 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 --- src/cmd/goinstall/main.go | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.50.0