Skip to content

Commit d1021e1

Browse files
liran2000Kavindu-Dodan
authored andcommitted
finishing
Signed-off-by: liran2000 <[email protected]>
1 parent c2c6614 commit d1021e1

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

providers/statsig/README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ go get github.com/open-feature/go-sdk-contrib/providers/statsig
1212
```
1313

1414
## Concepts
15-
* Boolean evaluation gets [gate](https://docs.statsig.com/server/golangSDK#checking-a-gate) status.
1615
* String/Integer/Float evaluations evaluation gets [Dynamic config](https://docs.statsig.com/server/golangSDK#reading-a-dynamic-config) or [Layer](https://docs.statsig.com/server/golangSDK#getting-an-layerexperiment) evaluation.
1716
As the key represents an inner attribute, feature config is required as a parameter with data needed for evaluation.
1817
For an example of dynamic config of product alias, need to differentiate between dynamic config or layer, and the dynamic config name.
18+
* Boolean evaluation gets [gate](https://docs.statsig.com/server/golangSDK#checking-a-gate) status when feature config is not passed.
19+
When feature config exists, it evaluates to the config/layer attribute, similar to String/Integer/Float evaluations.
20+
1921
* Object evaluation gets a structure representing the dynamic config or layer.
2022
* [Private Attributes](https://docs.statsig.com/server/golangSDK#private-attributes) are supported as 'privateAttributes' context key.
2123

@@ -74,3 +76,6 @@ Unit test based on Statsig [BootstrapValues](https://docs.statsig.com/server/gol
7476
As it is limited, evaluation context based tests are limited.
7577
See [provider_test.go](./pkg/provider_test.go) for more information.
7678

79+
## Known issues
80+
- Gate BooleanEvaluation with default value true cannot fallback to true.
81+
https://github.com/statsig-io/go-sdk/issues/32

providers/statsig/pkg/provider_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ func TestEvaluationMethods(t *testing.T) {
123123

124124
{"invalid_flag", false, of.FlattenedContext{"UserID": "123"}, false, "flag not found"},
125125

126+
// expected to succeed when https://github.com/statsig-io/go-sdk/issues/32 is resolved and adopted
126127
// {"invalid_flag", true, of.FlattenedContext{"UserID": "123", "feature_config": statsigProvider.FeatureConfig{FeatureConfigType: "CONFIG", Name: "test"}}, true, "flag not found"},
127128

128129
{"float", 1.23, of.FlattenedContext{"UserID": "123", "feature_config": statsigProvider.FeatureConfig{FeatureConfigType: "CONFIG", Name: "invalid_flag"}}, 1.23, "flag not found"},

0 commit comments

Comments
 (0)