1
0
mirror of https://github.com/golang/go synced 2024-11-18 22:44:48 -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:
Suzy Mueller 2018-07-26 12:58:38 -04:00
parent ceb18cec46
commit 83365fc83f

View File

@ -3,6 +3,7 @@ package packages
import (
"encoding/json"
"fmt"
"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),
OtherFiles: absJoin(p.Dir, p.SFiles, p.CFiles),
PkgPath: pkgpath,
Imports: importMap(append(p.Imports, p.TestImports)),
Imports: importMap(append(p.Imports, p.TestImports...)),
DepOnly: original[id] == nil,
})
}