-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump Go tooling to version 1.20 #12380
Conversation
* Fix go vet issue * Bump Go tooling to version 1.20 * Update workflows to use go-version file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from the question I left for tests, this looks good to me!
@@ -53,6 +53,7 @@ func TestBuildCommand_RunContext_CtxCancel(t *testing.T) { | |||
} | |||
|
|||
for _, tt := range tests { | |||
tt := tt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand that change, is there something missing here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes so in Go 1.20 the vet command will call this out as an issue. Since this is a common mistake.
Take from the Go release notes
The vet tool now reports references to loop variables following a call to [T.Parallel()](https://tip.golang.org/pkg/testing/#T.Parallel) within subtest function bodies. Such references may observe the value of the variable from a different iteration (typically causing test cases to be skipped) or an invalid state due to unsynchronized concurrent access.
Bump Go tooling to version 1.20
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
No description provided.