Update golang.org/x/mod to support tool directives
#160
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While attempting to install
trivyviabingoI ran into the following error:It's a fairly straightforward problem: the version of
golang.org/x/modused bybingodoes not recognise thetooldirective introduced in Go 1.24.To fix, we simply update that dependency and all is well again, i.e.
For better or worse, this required updating the Go version for
bingo, and atoolchaindirective got added to thego.modin the process. The Go version is inherited fromgolang.org/x/mod, but the toolchain might be negotiable if 1.24.0 is too modern. Other changes togo.sumcame from runninggo mod tidy.Note
It seems very likely that the CI workflow, when approved, will fail as it uses Go 1.18, 1.19, 1.20 and 1.21. With this change, it seems like we could only reasonably support 1.23 and 1.24, and the incoming 1.25 when released.
I'm happy to make that change too, just let me know if that's the direction you want to take.