mirror of
https://github.com/golang/go
synced 2024-11-26 14:56:47 -07:00
exp/types: permit importing packages without available source.
R=gri, iant CC=golang-dev https://golang.org/cl/6586051
This commit is contained in:
parent
0b448bdef7
commit
ff2f851af1
@ -42,7 +42,8 @@ func FindPkg(path, srcDir string) (filename, id string) {
|
|||||||
switch {
|
switch {
|
||||||
default:
|
default:
|
||||||
// "x" -> "$GOPATH/pkg/$GOOS_$GOARCH/x.ext", "x"
|
// "x" -> "$GOPATH/pkg/$GOOS_$GOARCH/x.ext", "x"
|
||||||
bp, _ := build.Import(path, srcDir, build.FindOnly)
|
// Don't require the source files to be present.
|
||||||
|
bp, _ := build.Import(path, srcDir, build.FindOnly|build.AllowBinary)
|
||||||
if bp.PkgObj == "" {
|
if bp.PkgObj == "" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user