Overview
This tutorial defines four flags in Go, loads those definitions directly with the CLI, generates typed accessors, and evaluates flags for one user. You need Go 1.23+, Node.js 22.12+ for the CLI, and a shipd account. For a step-by-step first flag, use the quickstart. For the equivalent TypeScript application, see the Node tutorial.Create the project
Define flags
Createshipd.config.go:
shipd.config.go
shipd.config.go and selects Go output automatically.
Push and generate accessors
internal/flags/flags_gen.go. Commit that file with shipd.config.go. The generator creates Defaults(), NewCheckout, SearchVariant, MaxRetries, and CheckoutPayload.
Read flags
Createmain.go. One client fetches a snapshot, then evaluates every check locally:
main.go
Run
Create a server SDK key for the same environment in the dashboard, then run:EvaluationContext on each request. Polling refreshes the snapshot every 30 seconds by default. Identify queues telemetry; it does not set a global evaluation identity.