aboutsummaryrefslogtreecommitdiff
path: root/_content/ref/mod.md
diff options
context:
space:
mode:
authorSean Liao <sean@liao.dev>2025-01-21 12:11:48 +0000
committerGopher Robot <gobot@golang.org>2025-02-11 08:36:58 -0800
commit255602d4a126d022f84732ad3247c14ad3fd30cc (patch)
tree423ee0f9fd685e52e16958c1d4257660b03210e3 /_content/ref/mod.md
parent9827523812c358c7c3dd228554ec9cc2f22c70c6 (diff)
downloadgo-x-website-255602d4a126d022f84732ad3247c14ad3fd30cc.tar.xz
_content: update go.mod examples to use full go versions
There's confusion on whether 1.X or 1.X.Y is canonical, the documentation should reflect the defaults of cmd/go. Updates golang/go#62278 Change-Id: I00489774e686d774cd970394237dff0462272cef Reviewed-on: https://go-review.googlesource.com/c/website/+/643615 Reviewed-by: Sam Thanawalla <samthanawalla@google.com> Reviewed-by: Michael Matloob <matloob@golang.org> Auto-Submit: Daniel Martí <mvdan@mvdan.cc> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to '_content/ref/mod.md')
-rw-r--r--_content/ref/mod.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/_content/ref/mod.md b/_content/ref/mod.md
index cce8160e..87a0f1b7 100644
--- a/_content/ref/mod.md
+++ b/_content/ref/mod.md
@@ -338,7 +338,7 @@ directive, made up of a keyword followed by arguments. For example:
```
module example.com/my/thing
-go 1.12
+go 1.23.0
require example.com/other/thing v1.0.2
require example.com/new/thing/v2 v2.3.4
@@ -546,7 +546,7 @@ major version. Individual minor and patch versions cannot be deprecated;
A `go` directive indicates that a module was written assuming the semantics of a
given version of Go. The version must be a valid [Go version](/doc/toolchain#version),
-such as `1.9`, `1.14`, or `1.21rc1`.
+such as `1.14`, `1.21rc1`, or `1.23.0`.
The `go` directive sets the minimum version of Go required to use this module.
Before Go 1.21, the directive was advisory only; now it is a mandatory requirement:
@@ -615,7 +615,7 @@ GoVersion = string | ident . /* valid release version; see above */
Example:
```
-go 1.14
+go 1.23.0
```
### `toolchain` directive {#go-mod-file-toolchain}
@@ -959,7 +959,7 @@ For example, consider this `go.mod` file:
```
module example.com/M
-go 1.16
+go 1.23.0
require (
example.com/A v1
@@ -1218,7 +1218,7 @@ A workspace is defined by a UTF-8 encoded text file named `go.work`. The
a keyword followed by arguments. For example:
```
-go 1.18
+go 1.23.0
use ./my/first/thing
use ./my/second/thing
@@ -1318,7 +1318,7 @@ GoVersion = string | ident . /* valid release version; see above */
Example:
```
-go 1.18
+go 1.23.0
```
### `toolchain` directive {#go-work-file-toolchain}