Skip to content

feat: go v6 docs - #260

Merged
Justin Hammond (Justintime50) merged 3 commits into
masterfrom
go_v6_docs
Nov 18, 2026
Merged

Justin Hammond (Justintime50) merged 3 commits into
masterfrom
go_v6_docs

Conversation

@Justintime50

Copy link
Copy Markdown
Member

Cuts the Go examples for the v6.0.0 release of easypost-go, following the same approach as #259 (node v9 docs).

Reviewer Note: Look at each commit individually. Commit 1 moves docs/golang/current to docs/golang/v5 with no changes. Commit 2 copies v5 back to current, switches every import to github.com/EasyPost/easypost-go/v6, and updates the six snippets that v6 needs changed. Commit 3 bumps the module to easypost-go/v6 v6.0.0.

  1. Moves docs/golang/current to docs/golang/v5 (no changes in that commit)
  2. Adds docs/golang/current for v6. All 125 files switch their import from /v5 to /v6. Every file is otherwise copied as-is except these six:
    • rates/retrieve-stateless.go: rates, _ := client.BetaGetStatelessRates(...) becomes response, _ := client.BetaGetStatelessRates(...) with fmt.Println(response.Rates). In v6, BetaGetStatelessRates returns the full response (*GetStatelessRatesResult) instead of only the rates key (rate.go, Upgrade Guide).
    • billing/retrieve-stripe-public-key.go: RetrieveEasypostStripeApiKey becomes RetrieveEasypostStripeAPIKey.
    • billing/add-stripe-bank-account.go: MandateData.IpAddress becomes IPAddress.
    • customer-portals/create.go: UserId, RefreshUrl and ReturnUrl become UserID, RefreshURL and ReturnURL.
    • embeddables/session.go: UserId becomes UserID.
    • tax-identifiers/create.go: TaxId and TaxIdType become TaxID and TaxIDType.
    • The renames above are from the v6 Upgrade Guide "Renamed Identifiers" section (UPGRADE_GUIDE.md).
  3. Bumps the root go.mod to go 1.20 (v6's minimum) and adds github.com/EasyPost/easypost-go/v6 v6.0.0. The v2 through v5 requirements are unchanged, so the older folders still build against their own majors.

I checked the other v6 breaking changes against current, and none need a snippet change:

  • trackers/list.go only passes PageSize, so removing ListTrackersOptions.TrackingCode doesn't affect it. trackers/batch.go already uses TrackingCodes.
  • No snippet sets ShipmentOptions.Machinable.
  • No snippet uses the other renamed identifiers.

just lint-go (golangci-lint v2.15.0) reports 0 issues on current, and go vet passes on docs/golang/current and docs/golang/v5. lint-go only lints current, the same as before, so no CI or justfile changes are needed.

No web-docs path changes are needed. easypost-web-docs only imports docs/golang/current/..., so it picks this up on its next examples submodule bump.

Comment thread docs/golang/v5/api-keys/create.go Dismissed
Comment thread docs/golang/v5/api-keys/disable.go Dismissed
Comment thread docs/golang/v5/api-keys/enable.go Dismissed
Comment thread docs/golang/v5/api-keys/retrieve.go Dismissed
Comment thread docs/golang/v5/api-keys/retrieve.go Dismissed
@Justintime50
Justin Hammond (Justintime50) marked this pull request as ready for review November 18, 2026 18:17
@Justintime50
Justin Hammond (Justintime50) merged commit 07cf1c8 into master Nov 18, 2026
18 checks passed
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.

3 participants