go mod edit -go=<GO_VERSION>Example:
go mod edit -go=1.24After this change is recommended to clean up potential unnecesary packages:
go mod tidyhttps://pkg.go.dev/cmd/go#hdr-Edit_go_mod_from_tools_or_scripts
go get -u ./...
go mod tidyMight be necessary to synchronize vendor to synchronize changes:
go mod vendorgo get <PACKAGE_URI>@v<PACKAGE_VERSION>Example:
go get gopkg.in/DataDog/[email protected]After this change, use tidy and sync vendor:
go mod tidy
go mod vendor