Skip to content
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

Update Go to 1.22 #32

Merged
merged 1 commit into from
Apr 9, 2024
Merged

Update Go to 1.22 #32

merged 1 commit into from
Apr 9, 2024

Conversation

moskyb
Copy link
Collaborator

@moskyb moskyb commented Apr 8, 2024

Description

Updates Golang to 1.22, and makes use of the easy-to-convert features it brings. Most notably:

  • Makes use of the new range-over-int technology
    • i used the regex for (a-z) := 0; (.*); \1\+\+ to find, and then for $1 := range $2 to replace. Golang then complained that some of the loop variables weren't being used, so i went through those and manually removed the variables that it was complaining about
  • Removes redeclarations of loop variables, as they're now scoped to the body of the loop. hooray!
    • i used the regex (\w+) := \1\n to find, and replaced with an empty string

(this description stolen from buildkite/agent#2631, but i did do exactly the same thing, so ¯\_(ツ)_/¯)

@moskyb moskyb requested a review from DrJosh9000 April 8, 2024 22:56
Copy link
Contributor

@DrJosh9000 DrJosh9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ LGTM

but I think you need to update pipeline.yaml also

@moskyb moskyb merged commit 44c3854 into main Apr 9, 2024
1 check passed
@moskyb moskyb deleted the go-1.22 branch April 9, 2024 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants