Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update-go: Update script to get go major and minor version
Starting in Go 1.21, Go toolchains will treat the go line in go.mod not as a guideline but as a rule, and the line can list specific point releases or release candidates. That is, Go 1.21.0 understands that it cannot even build code that says go 1.21.1 in its go.mod file, not to mention code that says much later versions like go 1.22.0. From go1.21 toolchain is enabled by default as auto mode and according to blog post[0], which means that if a module specify `go 1.21.0` in the mod file then other module requiring that module should have same minimum go rule. In case of image module it looks like they switched to using `go 1.21.0` instead of `go 1.21` in the mod file (for 5.32 tag release) and which stop us to using it as it is. ``` module m go 1.21.0 toolchain go1.21.4 This says that other modules requiring m need to provide at least Go 1.21.0, but when we are working in m itself, we want an even newer toolchain, at least Go 1.21.4 ``` In this PR we are going to update the script so that we can use `go1.N.P` version in mod file and `go1.N` for images and go runner. [0] https://go.dev/blog/toolchain
- Loading branch information