mirror of
https://github.com/golang/go
synced 2024-11-25 09:57:57 -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:
parent
b4e0aeac32
commit
20760e4335
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user