-
Notifications
You must be signed in to change notification settings - Fork 6
go 1.24.3 + deprecation fixes + minor tooling updates #68
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
Conversation
3c7a55b to
0b0eaa2
Compare
0b0eaa2 to
e9aa6f4
Compare
| mergedSchema.Splits = append(mergedSchema.Splits, schema.Splits...) | ||
| mergedSchema.FeatureCompletions = append(mergedSchema.FeatureCompletions, schema.FeatureCompletions...) | ||
| mergedSchema.RemoteKills = append(mergedSchema.RemoteKills, schema.RemoteKills...) | ||
| mergedSchema.IdentifierTypes = append(mergedSchema.IdentifierTypes, schema.IdentifierTypes...) |
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.
Making sure I'm reading this properly -- the linter caught that append can accept a slice, meaning we don't need a for loop.
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.
append can accept multiple elements to append to at once and were using the spread operator to so.
| return nil | ||
| } | ||
| return fmt.Errorf("Couldn't locate feature_completion of %s in schema", *f.featureGate) | ||
| return fmt.Errorf("couldn't locate feature_completion of %s in schema", *f.featureGate) |
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.
Why not? Should we be using something other than an inline string if we want to return a capital "C" to the end user?
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.
This is sort of a go idiom, https://google.github.io/styleguide/go/decisions.html#error-strings
If we do want to return a capital C we can ignore the linting rule
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.
It's fine -- generally happy to stick with community conventions in 99.9% of cases.
| if err != nil { | ||
| return err | ||
| } |
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.
Good catches, these.
| - errcheck | ||
| - unused |
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.
Do you intend to circle back and enable either of these?
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.
Yeah, I wanted to avoid adding any more changes to this PR.
smudge
left a comment
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.
domain LGTM && platform LGTM -- just some non-blocking questions - thanks for doing this! 👏
Sort of a big one here, I broke the PR down into hopefully easy to follow commits. Let me know if I should separate these to commits into several PR's.
This brings some updates to the go version which was falling behind, addressing some vulns in the go libs along the way, and some fixes from running the linter. Also included some minor tooling changes, using golangci lint/formatting and replacing hub with gh.