Skip to content

Add Stripe and HTTP client snippets to Go UltiSnips#52

Merged
conallob merged 1 commit into
mainfrom
claude/trusting-mendel-qszu6n
Jun 11, 2026
Merged

Add Stripe and HTTP client snippets to Go UltiSnips#52
conallob merged 1 commit into
mainfrom
claude/trusting-mendel-qszu6n

Conversation

@conallob

Copy link
Copy Markdown
Owner

Add a collection of UltiSnips for common Go patterns when working with Stripe and HTTP clients.

Changes:

  • htclient — HTTP client initialization with configurable timeout
  • sclient — Stripe client setup from environment variable
  • serr — Stripe error handling with type assertion and error code switching
  • jdec — JSON response body decoding with error handling
  • smain — Main function with STRIPE_SECRET_KEY validation
  • idem — Stripe idempotency key generation

These snippets reduce boilerplate when integrating Stripe payments or making HTTP requests in Go projects. Trigger with <C-e> and jump between placeholders with <C-j>/<C-k>.

https://claude.ai/code/session_0175T5PwVBu493YWDc2jsLhY

Adds htclient, sclient, serr, jdec, smain, and idem snippets for common
Stripe API and HTTP client patterns. Skipped the new ctx snippet as ctxto
already covers context.WithTimeout.

https://claude.ai/code/session_0175T5PwVBu493YWDc2jsLhY
@conallob conallob merged commit eef0d75 into main Jun 11, 2026
12 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.

2 participants