Go Files Exclusion After Importing "golang.org/x/net/route"
When attempting to import "golang.org/x/net/route" in a Go project, an error message appears stating, "build constraints exclude all Go files in go/src/golang.org/x/net/routego." This issue has been encountered by users in both Windows and Linux environments using VSCode.
Despite searching online, no apparent solutions have been discovered for a similar problem.
Resolution:
A successful resolution to this issue was reported in Goland:
go clean -modcache
Executing this command in the terminal cleaned the module cache, allowing the subsequent build to resolve the file exclusion problem.
The above is the detailed content of Why are Go files excluded after importing 'golang.org/x/net/route', and how can I fix the 'build constraints exclude all Go files' error?. For more information, please follow other related articles on the PHP Chinese website!