You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GetFeatureFlagResult: New method that returns both the flag value and payload in a single call, while properly tracking feature flag usage via $feature_flag_called events.
Deprecations
GetFeatureFlagPayload: Deprecated in favor of GetFeatureFlagResult. The new method provides better tracking and a more convenient API.
Migration Guide
// Before (two calls, no event tracking for payload-only):flag, _:=client.GetFeatureFlag(payload)
payloadStr, _:=client.GetFeatureFlagPayload(payload)
// After (single call, always tracks):result, err:=client.GetFeatureFlagResult(payload)
iferr!=nil { /* handle */ }
ifresult.Enabled {
varconfigMyConfigresult.GetPayloadAs(&config)
}
Note: GetFeatureFlagResult returns nil, error when a flag doesn't exist (rather than a result with Enabled: false). Check for errors to distinguish between a disabled flag and a missing flag:
result, err:=client.GetFeatureFlagResult(payload)
iferrors.Is(err, posthog.ErrFlagNotFound) {
// Flag doesn't exist - use default behavior
}
iferr!=nil {
// Other error (e.g., network issue)
}
ifresult.Enabled {
// Flag exists and is enabled
} else {
// Flag exists but is disabled
}
GetFeatureFlagResult: New method that returns both the flag value and payload in a single call, while properly tracking feature flag usage via $feature_flag_called events.
Deprecations
GetFeatureFlagPayload: Deprecated in favor of GetFeatureFlagResult. The new method provides better tracking and a more convenient API.
Migration Guide
// Before (two calls, no event tracking for payload-only):flag, _:=client.GetFeatureFlag(payload)
payloadStr, _:=client.GetFeatureFlagPayload(payload)
// After (single call, always tracks):result, err:=client.GetFeatureFlagResult(payload)
iferr!=nil { /* handle */ }
ifresult.Enabled {
varconfigMyConfigresult.GetPayloadAs(&config)
}
Note: GetFeatureFlagResult returns nil, error when a flag doesn't exist (rather than a result with Enabled: false). Check for errors to distinguish between a disabled flag and a missing flag:
result, err:=client.GetFeatureFlagResult(payload)
iferrors.Is(err, posthog.ErrFlagNotFound) {
// Flag doesn't exist - use default behavior
}
iferr!=nil {
// Other error (e.g., network issue)
}
ifresult.Enabled {
// Flag exists and is enabled
} else {
// Flag exists but is disabled
}
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase will rebase this PR
@dependabot recreate will recreate this PR, overwriting any edits that have been made to it
@dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
@dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Addition of new support libraries
Our project now includes the github.com/goccy/go-json v0.10.5 and github.com/hashicorp/golang-lru/v2 v2.0.7 libraries. These indirectly support our main functionalities by providing additional features and performance improvements.
Update of analytics library
The version of github.com/posthog/posthog-go used in our project has been updated from an older version to v1.10.0. This brings more stable, optimized, and effective data tracking capabilities to our product.
Checksums Updated
Checkums in go.sum have been updated to maintain the integrity and safety of our project with the new and updated dependencies.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependenciesdependenciesgoPull requests that update Go code
0 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps github.com/posthog/posthog-go from 0.0.0-20230801140217-d607812dee69 to 1.10.0.
Release notes
Sourced from github.com/posthog/posthog-go's releases.
... (truncated)
Changelog
Sourced from github.com/posthog/posthog-go's changelog.
... (truncated)
Commits
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)