github.com/FireWeave-HQ/fireweave-sdk/sdks/go/v2. It evaluates control points through client.ControlPoints() and registers targets through client.RegisterTarget. Those are the two v1 capabilities. The wire protocol uses flagKey.
The /v2 suffix is required in both go get and import paths. sdks/go/v2.2.0 does not resolve — pin v2.3.0 or later.
Supported versions
Fromgo.mod:
Install
fireweave façade only. Init is the composition root.
Initialize
fireweave.Init is the single entry point. Mode is required and never inferred. Init returns a non-nil error (kind Configuration) when mode is missing, remote credentials are blank, APIURL fails the host allowlist, or local mode is combined with credentials.
os.Getenv in the snippet is your app, not the SDK.
Public ControlPoints() methods and RegisterTarget do not take context.Context. They call the runtime with context.Background(). The remote adapter’s configured request timeout bounds the HTTP call.
Runtime and Client are safe for concurrent use.
Configuration and authentication
Options on Init:
Default allowlist (
infrastructure/adapters/remote.DefaultAllowedHosts) is Fireweave production/staging hosts plus loopback. It is not derived from your APIURL hostname. A self-hosted fw-server must list its own host, or pass AllowedHosts: []string{"*"}.
Auth: Authorization: Bearer <key>. Paths: POST /v1/flags/evaluate, POST /v1/targets/register.
See Configuration and auth.
Targets
RegisterTarget is on the client.
opts may be nil. The call never panics. In local mode the adapter records the target in-process and traces [fireweave:local].
See Targeting and targets.
Control points
client.ControlPoints() is the documented namespace. client.Flags() is the same object (deprecated alias, silent at runtime).
FlagType: FlagTypeBoolean, FlagTypeString, FlagTypeNumber, FlagTypeObject. There is no separate integer/float type in v1.
GetBooleanValue, GetStringValue, GetNumberValue, GetObjectValue, GetBooleanDetails, GetStringDetails, GetNumberDetails, GetObjectDetails, Evaluate. Evaluation never returns an error and never panics — failures are Decision{Reason: ERROR}.
EvaluateOptions has one real field: IncludePayload.
See Control points.
Adapters
Prefer
fireweave.Init. Construct adapters directly only for custom wiring.
See Adapters.
Errors
fireweave.Error with ErrorKind constants — the same 15 kinds. Implements error. Evaluation still returns a Decision; Init and Runtime.Shutdown return error.
See Errors.
Testing
Local mode for an offline boolean seed.infrastructure/adapters/inmemory with WithFlags for fixture-driven tests. The test-server stub does not implement target registration.
See Testing.
Shutdown
There is noClient.Shutdown. Shut down the runtime:
Not in this SDK
- An unsuffixed
…/sdks/gomodule path FireweaveProvider/ any OpenFeature packageReleases(),Exposures(),Signals(),Capabilities(),Guardrails()- Environment-variable auto-read
context.ContextonControlPoints()/RegisterTarget
Next
Quickstart
Offline evaluate in every language.
Compatibility
Seven-language surface and the 65×7 aggregate.

