1
0
mirror of https://github.com/golang/go synced 2024-11-25 05:57:57 -07:00

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
This commit is contained in:
Scott Lawrence 2010-09-13 12:59:59 +10:00 committed by Andrew Gerrand
parent 3e8cc7f114
commit 25c8d4e932

View File

@ -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