Overview
Release notes for the Go SDK, newest first. Go releases are taggedsdks/go/vX.Y.Z and are independent of npm packages.
Added
First release of the Go server SDK (Go 1.23+, no dependencies).- One module,
github.com/alasti-company/useshipd.com/sdks/go, with aconfigsubpackage (config.ShipdConfig) for defining flags inshipd.config.go. shipd.Newwith local evaluation from a polled snapshot.IsEnabled,GetVariant,GetNumber,GetJSON, andEvaluate(value, reason, rule ID, snapshot version).- Same targeting and rollout buckets as the TypeScript SDK, checked against a shared fixture.
Ready(ctx)returnsnilonce a snapshot loads, or the initial fetch error as soon as that attempt fails.Bootstrapserves a snapshot until a newer one is fetched, so tests can exercise targeting rules without a fake edge.Identifyqueues identify events for audience insights without changing evaluation context.- Events flush every
FlushInterval(5 seconds) and as soon asFlushAt(50) events are buffered.DroppedEventscounts events lost to buffer overflow. SnapshotVersionreports the loaded version without recording an event.Shutdown(ctx)attempts to deliver pending events, then closes the client even if delivery fails.Closestops immediately and implementsio.Closer.Refresh,Flush, andLastErrorfor manual control.- Exported errors for
errors.Is:ErrClosed,ErrMalformedSnapshot, andErrUnsupportedSchema. - The client always connects to
https://edge.useshipd.com.Overrides.UnsafeEndpointreplaces it for shipd development and tests only, matching the TypeScript SDK’soverrides.unsafeEndpoint.