Skip to content

Commit

Permalink
Use correct go directive in go.mod file (#5720)
Browse files Browse the repository at this point in the history
The version provided in the go directive must be a valid Go
version. go1.21 refers to a development version of Go, not a released
version. Prior to 1.21, 1.X was actually the first released version for
Go language version 1.X. Starting with 1.21, the first released version
is 1.X.0, and the go directive in go.mod should correspond to a valid
toolchain version (unless a toolchain directive is also present).

One way to reproduce the issue is to run:
`GOTOOLCHAIN="go1.20+auto" go version`

When using the `go 1.21` directive, the above command will fail as go
will try to download toolchain 1.21, which does not exist.

See golang/go#62278 for a detailed discussion.

Signed-off-by: Antonin Bas <[email protected]>
  • Loading branch information
antoninbas authored Nov 17, 2023
1 parent 68b5a02 commit 0ef2e54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module antrea.io/antrea

go 1.21
go 1.21.0

require (
antrea.io/libOpenflow v0.13.0
Expand Down

0 comments on commit 0ef2e54

Please sign in to comment.