Code modernizations via go fix + manual follow-up#6746
Merged
sorindumitru merged 5 commits intospiffe:mainfrom Mar 26, 2026
Merged
Code modernizations via go fix + manual follow-up#6746sorindumitru merged 5 commits intospiffe:mainfrom
go fix + manual follow-up#6746sorindumitru merged 5 commits intospiffe:mainfrom
Conversation
MarcosDY
previously approved these changes
Mar 23, 2026
Collaborator
MarcosDY
left a comment
There was a problem hiding this comment.
This looks great!, Can you rebase?
Excluding only changes made to - pkg/server/endpoints/bundle/internal/acmetest/ca.go - pkg/server/endpoints/bundle/internal/autocert/autocert.go As this is effectively "vendored" code. Signed-off-by: Carlo Teubner <cteubner1@bloomberg.net>
Signed-off-by: Carlo Teubner <cteubner1@bloomberg.net>
Finish the job that "go fix" started with this. Signed-off-by: Carlo Teubner <cteubner1@bloomberg.net>
Our current staticcheck version is too old to know about the "new(value)" construct and gets confused by it. As it happens, we can slightly simplify the code here anyway. Signed-off-by: Carlo Teubner <cteubner1@bloomberg.net>
Finish the job that "go fix" started with this. This actually includes some race conditions fixes, where we were previously calling "wg.Add" inside the goroutine, when we should have been calling it before spawning the goroutine. Signed-off-by: Carlo Teubner <cteubner1@bloomberg.net>
Contributor
Author
Done. |
MarcosDY
approved these changes
Mar 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Modernize code using
go fix.On top of that, manually complete a couple of migrations that
go fixcouldn't fully do on its own:(sync.WaitGroup).Go()wherever possible (and fixing some minor race conditions in the process).new(value)expressions (as introduced in Go 1.26) instead of using helper functions for this.This change is structured into individual commits that make clear which parts were done automatically via
go fix(and hence should need less scrutiny).