Go 1.18 mod tidy
What does this MR do?
- Upgrades .tool-versions to include go1.18.6
- Separates the
require
blocks ingo.mod
into strictly direct and indirect dependencies.- I've removed the direct
golang.org/x/sys
replace. It was once used to force a specific version due to a Docker incompatability. Forcing it is no longer required.
- I've removed the direct
Why was this MR needed?
We just upgraded to 1.18, so should remove the legacy require
block situation. We should also ensure we're using the same local tool as CI.
Technically Go 1.17 introduced two require
blocks in go.mod for direct and indirect dependencies. Go won't automatically re-arrange these and we have two require
blocks both containing indirect dependencies. If you were to go get <dep>
it would add a third require
block, because both existing blocks contain indirect dependencies.
What's the best way to test this MR?
There's not really any change. The pipeline should be enough to test the golang.org/x/sys
modification and mod rewrite.