1
0
mirror of https://github.com/golang/go synced 2024-11-17 15:54:39 -07:00

cmd/go/internal/modload: remove unused moduleHasRootPackage function

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>
This commit is contained in:
Bryan C. Mills 2022-10-07 12:41:58 -04:00 committed by Gopher Robot
parent 90a3527427
commit 67cd77b88f

View File

@ -1009,17 +1009,6 @@ func (e *PackageNotInModuleError) ImportPath() string {
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