The documentation for Load says: “Load returns an error if any of the patterns was invalid as defined by the underlying build system. It may return an empty list of packages without an error, for instance for an empty expansion of a valid wildcard. Errors associated with a particular package are recorded in the corresponding Package's Errors list, and do not cause Load to return an error.” Therefore, it should not be an error for a pattern to match no packages. If the pattern is a literal package path that does not exist, we should prefer to return a *Package for it with an error in the Errors field. Change-Id: Iaecfb920097e3b520e763bd52c0e326d2e7a4861 Reviewed-on: https://go-review.googlesource.com/137075 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org> |
||
---|---|---|
.. | ||
analysis | ||
ast/astutil | ||
buildutil | ||
callgraph | ||
cfg | ||
gccgoexportdata | ||
gcexportdata | ||
internal | ||
loader | ||
packages | ||
pointer | ||
ssa | ||
types/typeutil | ||
vcs |