Skip to content

Commit 255602d

Browse files
seankhliaogopherbot
authored andcommitted
_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 <[email protected]> Reviewed-by: Michael Matloob <[email protected]> Auto-Submit: Daniel Martí <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: David Chase <[email protected]>
1 parent 9827523 commit 255602d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

_content/doc/modules/managing-dependencies.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ directory.
357357
```
358358
module example.com/mymodule
359359

360-
go 1.16
360+
go 1.23.0
361361

362362
require example.com/theirmodule v0.0.0-unpublished
363363

@@ -404,7 +404,7 @@ module's own repository.
404404
```
405405
module example.com/mymodule
406406

407-
go 1.16
407+
go 1.23.0
408408

409409
require example.com/theirmodule v1.2.3
410410

_content/ref/mod.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ directive, made up of a keyword followed by arguments. For example:
338338
```
339339
module example.com/my/thing
340340
341-
go 1.12
341+
go 1.23.0
342342
343343
require example.com/other/thing v1.0.2
344344
require example.com/new/thing/v2 v2.3.4
@@ -546,7 +546,7 @@ major version. Individual minor and patch versions cannot be deprecated;
546546

547547
A `go` directive indicates that a module was written assuming the semantics of a
548548
given version of Go. The version must be a valid [Go version](/doc/toolchain#version),
549-
such as `1.9`, `1.14`, or `1.21rc1`.
549+
such as `1.14`, `1.21rc1`, or `1.23.0`.
550550

551551
The `go` directive sets the minimum version of Go required to use this module.
552552
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 */
615615
Example:
616616

617617
```
618-
go 1.14
618+
go 1.23.0
619619
```
620620

621621
### `toolchain` directive {#go-mod-file-toolchain}
@@ -959,7 +959,7 @@ For example, consider this `go.mod` file:
959959
```
960960
module example.com/M
961961
962-
go 1.16
962+
go 1.23.0
963963
964964
require (
965965
example.com/A v1
@@ -1218,7 +1218,7 @@ A workspace is defined by a UTF-8 encoded text file named `go.work`. The
12181218
a keyword followed by arguments. For example:
12191219

12201220
```
1221-
go 1.18
1221+
go 1.23.0
12221222
12231223
use ./my/first/thing
12241224
use ./my/second/thing
@@ -1318,7 +1318,7 @@ GoVersion = string | ident . /* valid release version; see above */
13181318
Example:
13191319

13201320
```
1321-
go 1.18
1321+
go 1.23.0
13221322
```
13231323

13241324
### `toolchain` directive {#go-work-file-toolchain}

0 commit comments

Comments
 (0)