diff --git a/_content/doc/mod.md b/_content/doc/mod.md index 0a84b67e62..04d3e35806 100644 --- a/_content/doc/mod.md +++ b/_content/doc/mod.md @@ -266,10 +266,11 @@ package, in the directory `b`. At least one file with the `.go` extension must be present in a directory for it to be considered a package. [Build constraints](/pkg/go/build/#hdr-Build_Constraints) are not applied for this purpose. If exactly one module in the build list provides the package, that -module is used. If two or more modules provide the package, an error is -reported. If no modules provide the package, the `go` command will attempt to -find a new module (unless the flags `-mod=readonly` or `-mod=vendor` are used, -in which case, an error is reported). +module is used. If no modules provide the package or if two or more modules +provide the package, the `go` command reports an error. The `-mod=mod` flag +instructs the `go` command to attempt to find new modules providing missing +packages and to update `go.mod` and `go.sum`. The [`go get`](#go-get) and [`go +mod tidy`](#go-mod-tidy) commands do this automatically.