Unusual `go` directive in `go.mod`
mx-psi opened this issue · comments
The top-level go.mod
uses 1.21.0
as its go
directive
Lines 1 to 3 in 32b95e4
This is an unusual choice that forces every Go module dependent on cillium/ebpf to also specify the bugfix version on its go
directive.
As far as I can tell, there is no evidence that using the bugfix version is recommended or encouraged by the Go authors or Go compiler contributors:
- The go.mod file reference has
go 1.14
as an example, no examples with the bugfix version, and indicates that thego
directive specifies semantics (which should not change in bugfix versions) - The comment here b3432fb#commitcomment-138898478 points to golang/go/issues/62278, which doesn't seem to explicitly advocate for adding
.0
in all cases, only as a workaround to a specific issue
What is the rationale for specifying the bugfix version?