Change-Id: Iaf118150b8cf48aa42db3477bffdb92bd39f632a
Reviewed-on: https://go-review.googlesource.com/c/go/+/440295
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
return ""
}
-// moduleHasRootPackage returns whether module m contains a package m.Path.
-func moduleHasRootPackage(ctx context.Context, m module.Version) (bool, error) {
- needSum := false
- root, isLocal, err := fetch(ctx, m, needSum)
- if err != nil {
- return false, err
- }
- _, ok, err := dirInModule(m.Path, m.Path, root, isLocal)
- return ok, err
-}
-
// versionHasGoMod returns whether a version has a go.mod file.
//
// versionHasGoMod fetches the go.mod file (possibly a fake) and true if it