1
0
mirror of https://github.com/golang/go synced 2024-11-25 12:17:56 -07:00

go/build: do not report Target for local imports

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5820064
This commit is contained in:
Russ Cox 2012-03-15 15:08:57 -04:00
parent b4e0aeac32
commit 20760e4335

View File

@ -363,6 +363,7 @@ func (ctxt *Context) Import(path string, srcDir string, mode ImportMode) (*Packa
binaryOnly := false
if IsLocalImport(path) {
pkga = "" // local imports have no installed path
if srcDir == "" {
return p, fmt.Errorf("import %q: import relative to unknown directory", path)
}