Skip to content
FeedbackDashboard
Codegen targets

Go

Generate production-ready Go SDKs from your OpenAPI specification

The Stainless Go SDK generator creates idiomatic, type-safe Go client libraries from your OpenAPI specification.

Example repositories:

To generate a Go SDK, add the go target to your Stainless configuration file:

targets:
go:
module_path: github.com/my-org/my-sdk-go
edition: go.2025-10-08
targets:
go:
module_path: github.com/my-org/my-sdk-go
# Specify the edition
edition: go.2025-10-08

For a complete list of configuration options, see the Go target reference.

Editions allow Stainless to make improvements to SDKs that aren’t backwards-compatible. You can explicitly opt in to new editions when you’re ready. See the SDK and config editions reference for more information.

go.2025-10-08

  • Initial edition for Go (used by default if no edition is specified)

Go installs packages from source, so nothing other than the GitHub repository is required for setup. We automatically request updates from the Go package index which updates your godoc on a release.