Open
Description
Background
In continue of OpenFeature PR, it is a common practice to evaluate a boolean/gate with a default value:
BooleanEvaluation(ctx context.Context, flag string, defaultValue bool, evalCtx of.FlattenedContext)
Problem
BooleanEvaluation with default value true cannot fallback to true.
On scenarios such as get gate of non-existing gate, statsig returns false without indication of whether it was successful get gate or some error reason. Therefore, the evaluation will be evaluated to false in this case.
Suggested solution
- Similar to dynamic config function GetString(key string, fallback string), add:
GetGate(user User, gate string, fallback bool) FeatureGate
- Enrich FeatureGate with error and reason.
Metadata
Metadata
Assignees
Labels
No labels