Go SDK
The github.com/sangho/sangho-go module is the official
Sangho client for Go 1.21+. It is idiomatic, fully typed, and
designed for production environments — with no unnecessary third-party dependencies.
Installation
Available modules
All API responses return a (result, error) tuple. Optional
parameters are passed via dedicated structs suffixed with Params — e.g. PaymentIntentCreateParams. Zero empty interface{} in critical code paths.
Initialization
Error handling
Errors returned by the SDK are of type *sangho.Error. Use errors.As to access the business fields Code, Message, and HTTPStatus.
Pagination
List endpoints return a generic type sangho.ListResponse[T] with fields Count, Next, Previous, and Results. Use the Page and PageSize parameters to
navigate.
The SDK automatically retries 429 (rate limit) and 5xx errors with exponential backoff. Configure WithMaxRetries at initialization (default: 3).