Rename Go package from posthog to insights across all 80+ files.
Consumers now import as `insights "github.com/hanzoai/insights-go"`
and use insights.Client, insights.Config, insights.Capture, etc.
- Rename posthog.go -> insights.go, posthog_test.go -> insights_test.go
- Update package declaration from posthog to insights in all .go files
- Update SDKName from posthog-go to insights-go
- Update DefaultEndpoint from app.posthog.com to insights.hanzo.ai
- Update all FieldError/ConfigError type strings
- Update User-Agent headers, log prefixes, comments, and docs
- Update JSON test fixtures to match new SDK name
- Update CLI, examples, extras, and sdk_compliance_adapter
- Fix pre-existing go vet warnings (non-constant format strings)
Add support for passing device_id to the PostHog /flags endpoint.
This allows clients to identify devices separately from users when
evaluating feature flags.
- Add DeviceId field to FlagsRequestData (omitted when nil)
- Add DeviceId to FeatureFlagPayload and FeatureFlagPayloadNoKey
- Thread device_id through all flag evaluation paths
- Add tests verifying device_id is passed in request payload
* refactor: Rename `FeatureFlagResult` -> `featureFlagEvaluationResult`
It's an internal type used to track request metadata to be reported via
$feature_flag_called. This shouldn't be conflated with the
`getFeatureFlagResult()` API.
* feat: Add `GetFeatureFlagResult` method to client
This method returns an object indicating if the flag is enabled, what
the variant is, and a method for parsing the payload as a given type. It
emits a 'feature flag called' event by default, and will become
the canonical method of fetching a feature flag
* fix: Always return nil if a flag doesn't exist
* doc: Update CHANGELOG