You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you run commands like go install, go build, or go run, the go command will automatically download the remote module and record its version in your go.mod file.
However, since version 1.16 that no longer seems to be correct. From the "No automatic changes to go.mod and go.sum" section of the New module changes in Go 1.16 blog post:
Previously, when the go command found a problem with go.mod or go.sum like a missing require directive or a missing sum, it would attempt to fix the problem automatically
...
In Go 1.16, module-aware commands report an error after discovering a problem in go.mod or go.sum instead of attempting to fix the problem automatically. In most cases, the error message recommends a command to fix the problem.
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Ran
go install
after adding remote module "github.com/google/go-cmp/cmp" toimport
block.What did you expect to see?
What did you see instead?
More info
The Importing packages from remote modules section of the "How to Write Go Code" page states:
However, since version 1.16 that no longer seems to be correct. From the "No automatic changes to go.mod and go.sum" section of the New module changes in Go 1.16 blog post:
The text was updated successfully, but these errors were encountered: