Repository navigation
refactor!: upgrade to golangci-lint v2 and fix lint findings (DOCS-936) - #300
Merged
Merged
Conversation
Justin Hammond (Justintime50)
marked this pull request as ready for review
November 16, 2026 18:00
Stephen Watkins (stephenjwatkins)
approved these changes
Nov 16, 2026
Stephen Watkins (stephenjwatkins)
left a comment
Member
There was a problem hiding this comment.
looks good. merge examples#258 first and re-pin the submodule to its squash commit? d1778d1 is the branch head, and examples squash-merges and deletes the branch
also, while we're in a major: BetaRefundByAmount and BetaRefundByPaymentLog (referral_customer.go:223,239) pass a nil out to c.do, so a 2xx errors with json: Unmarshal(nil *easypost.BetaPaymentRefund) (the tests only replay 422s). &out fixes it. same file, :165 sends "mandata_data" where the other libs send mandate_data
Bumps golangci-lint to v2.15.0 (v1 doesn't support newer Go), points the examples submodule at the v2 shared config, and lints CI on Go 1.27. Fixes the new findings, mostly ST1003 initialism renames. BREAKING CHANGE: exported identifiers are renamed to use Go initialisms (e.g. Id to ID, Url to URL). JSON and URL tags are unchanged. See UPGRADE_GUIDE.md for the full list.
BetaRefundByAmount and BetaRefundByPaymentLog passed a nil out to c.do, so a successful response failed to decode. AddReferralCustomerBankAccountFromStripe sent mandata_data instead of mandate_data.
Justin Hammond (Justintime50)
force-pushed
the
golangci_lint_v2
branch
from
November 17, 2026 17:14
2754a39 to
05524ae
Compare
BetaAddPaymentMethodWithContext passed a nil out to c.do, so a successful response failed to decode. Pass &out, matching the beta refund fix.
1 of 4 tasks
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.
Description
Upgrades golangci-lint from v1.64.6 to v2.15.0 for DOCS-936, since v1 doesn't support Go 1.26+. Part of the v6 major.
examplessubmodule from 739f96c to chore: migrate Go lint config to golangci-lint v2 (DOCS-936) examples#258 (75 examples commits), which migrates the sharedstyle_guides/golang/.golangci.ymlto v2. The bump also picks up the earlier fixture move toexamples/fixtures/(flatten structure examples#250), so test paths are updated.https://golangci-lint.run/install.sh; the oldmasterinstall.sh fails checksum verification on recent releases.IdtoID,UrltoURL,ExternalApiErrortoExternalAPIError, andBetaCreateBankAccountClientSecretWithReturlUrltoBetaCreateBankAccountClientSecretWithReturnURL, fixing the typo). JSON and URL tags are unchanged. The full list is inUPGRADE_GUIDE.mdandCHANGELOG.md.Testing
Existing cassettes replay unchanged on Go 1.16, 1.24 and 1.27.
Pull Request Type