Repository navigation
Update Go to 1.27.1 and modernize codebase - #9701
Conversation
go fix ./...
go get [email protected] go mod tidy
The majority of the changes are related to this language change: > a key in a struct literal may now be any valid field selector for the struct type, > allowing fields in nested or embedded structs to be initialized directly. See - https://go.dev/blog/go1.27 - https://victoriametrics.com/blog/go-1-27/#struct-literal-field-selectors go fix ./...
|
I was going to open an issue to remind myself to do this stuff. I've had this tab open as a reminder: https://victoriametrics.com/blog/go-1-27/index.html Love these little chore wins 🧹 |
|
@taylorsilva I am curious. Would you accept also something like: 3a6d0b9 ? |
|
@alicul I am very open to discussing this. I know there's prior discussion about this and I think the general sentiment was that we don't generally want the concourse/concourse code base treated as a library. That said, this would probably help with a bunch of CVE's that get flagged sometimes since we're not following this pattern. Let's review prior discussion before making a decision. Feel free to open an issue where we can discuss this further. |
Summary
Upgrades the Go toolchain to Go 1.27.1 and modernizes the codebase by running
go fix ./...for Go 1.26 and Go 1.27 language features.End goal: remove workarounds we put in place due to the Go bugs that are now resolved:
concourse/go-archive/tarfs/extract.go
Line 134 in 7c5c7ca
concourse/go-archive/tarfs/extract.go
Line 236 in 7c5c7ca
Changes
1.27.1ingo.mod(go get [email protected] && go mod tidy).go fix ./....References
Thanks to @marco-m-pix4d for teaching me about go fix :)