Upgrading to modern Go
Author: danielorbachCreated Jun 4, 2025Updated Jun 4, 2025
Hi team,
I’m preparing a contribution to the repository and would like to ask about updating the go directive in go.mod.
Currently, the module specifies go1.12, but newer Go versions introduce several language and tooling improvements that would simplify development and testing. For example:
go1.16: Introducedgo:embed, which I can use for embedding test data.go1.18: Introduced generics, which would simplify comparisons (e.g., I compare[]gopacket.LayerTypeslices) and reduce boilerplate.go1.19: Improved doc comment formatting (e.g., link parsing), which affects how documentation is rendered on pkg.go.dev, so I should know whether to use link syntax or not.
Would you be open to updating the module’s Go version, or accepting contributions that use features introduced in later versions? Alternatively, is there a minimum Go version you’d prefer contributors target?
Thanks for your time.
Source: google/gopacket