Skip to main content

Go

Go SDK

Idiomatic Go SDK with context support and zero dependencies.

$go get github.com/appneural/appneural-go/v2
Context supportZero external dependenciesInterface-based designRace-free concurrencyGo 1.21+ compatibleTable-driven test helpers

Code

Get started in minutes.

initialization.go
import "github.com/appneural/appneural-go/v2"

client := appneural.NewClient(
    appneural.WithAPIKey(os.Getenv("APPNEURAL_API_KEY")),
    appneural.WithEnvironment("production"),
)

Configuration

SDK options.

OptionTypeDescription
WithAPIKeystringYour API key
WithEnvironmentstringproduction | sandbox
WithTimeouttime.DurationRequest timeout
WithMaxRetriesintMax retry attempts

Best Practices

Recommended patterns.

Always pass context with timeouts
Use errors.Is for error checking
Leverage interfaces for testing
Use connection pooling

Enterprise Intelligence

Get started with Go SDK.

Idiomatic Go SDK with context support and zero dependencies.

Scope and availability confirmed individually · Written terms define the engagement