mirror of
https://github.com/golang/go
synced 2024-11-18 22:55:23 -07:00
go/packages: fix bug preventing build
Change-Id: Ia5bc184c3762dc00338bfad182371568827da75e Reviewed-on: https://go-review.googlesource.com/126095 Run-TryBot: Suzy Mueller <suzmue@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
ceb18cec46
commit
83365fc83f
@ -3,6 +3,7 @@ package packages
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"golang.org/x/tools/imports"
|
"golang.org/x/tools/imports"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -71,7 +72,7 @@ func golistPackagesFallback(cfg *rawConfig, words ...string) ([]*rawPackage, err
|
|||||||
GoFiles: absJoin(p.Dir, p.GoFiles, p.TestGoFiles, p.CgoFiles),
|
GoFiles: absJoin(p.Dir, p.GoFiles, p.TestGoFiles, p.CgoFiles),
|
||||||
OtherFiles: absJoin(p.Dir, p.SFiles, p.CFiles),
|
OtherFiles: absJoin(p.Dir, p.SFiles, p.CFiles),
|
||||||
PkgPath: pkgpath,
|
PkgPath: pkgpath,
|
||||||
Imports: importMap(append(p.Imports, p.TestImports)),
|
Imports: importMap(append(p.Imports, p.TestImports...)),
|
||||||
DepOnly: original[id] == nil,
|
DepOnly: original[id] == nil,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user