1
0
mirror of https://github.com/golang/go synced 2024-11-22 19:54:39 -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:
David Symonds 2012-09-30 15:56:23 +10:00
parent 0b448bdef7
commit ff2f851af1

View File

@ -42,7 +42,8 @@ func FindPkg(path, srcDir string) (filename, id string) {
switch {
default:
// "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 == "" {
return
}