"go module @latest found but does not contain package" Issue
When using Go modules for the first time, you may encounter the error message:
module github.com/mkideal/cli@latest found (v0.2.2), but does not contain package github.com/mkideal/cli module github.com/mkideal/cli@latest found (v0.2.2), but does not contain package github.com/mkideal/cli/ext
This error occurs during go build and is not encountered during go get, indicating that the issue may not lie with the proxy settings or the Go module/package.
In this case, the root cause of the problem is a cached copy of the module metadata in the Go module cache. To resolve this, run the following command:
go clean -modcache
This command clears the Go module cache, allowing Go to download the latest metadata for the module and its dependencies. This ensures that the package versions and their contents are accurately reflected during the go build process.
Ce qui précède est le contenu détaillé de. pour plus d'informations, suivez d'autres articles connexes sur le site Web de PHP en chinois!