Skip to content

Commit 4a3aabc

Browse files
authored
Merge branch 'main' into rd/goff
2 parents b2f2413 + 3e15bba commit 4a3aabc

13 files changed

Lines changed: 91 additions & 279 deletions

File tree

providers/aws-ssm/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/open-feature/go-sdk-contrib/providers/aws-ssm
22

3-
go 1.23.0
3+
go 1.24.0
44

55
require (
66
github.com/aws/aws-sdk-go-v2 v1.36.6

providers/configcat/go.mod

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module github.com/open-feature/go-sdk-contrib/providers/configcat
22

3-
go 1.23.0
4-
5-
toolchain go1.24.4
3+
go 1.24.0
64

75
require (
86
github.com/configcat/go-sdk/v9 v9.0.7
@@ -16,6 +14,5 @@ require (
1614
github.com/go-logr/logr v1.4.3 // indirect
1715
github.com/pmezard/go-difflib v1.0.0 // indirect
1816
go.uber.org/mock v0.5.2 // indirect
19-
golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 // indirect
2017
gopkg.in/yaml.v3 v3.0.1 // indirect
2118
)

providers/configcat/go.sum

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,31 @@
11
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
22
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
3-
github.com/configcat/go-sdk/v9 v9.0.6 h1:wWoBqiOwA8q2TMHYfRLgF1Ub+qi1Wk3Opzag6mvz7ws=
4-
github.com/configcat/go-sdk/v9 v9.0.6/go.mod h1:LA9GtJxbY8tQAs/LO4VQMPBNmlFqWMdWg707/hvrpmg=
53
github.com/configcat/go-sdk/v9 v9.0.7 h1:BGa2lzpkH8i/f5BI8TcNp6sAtV36aKxejV7nSFSwtu4=
64
github.com/configcat/go-sdk/v9 v9.0.7/go.mod h1:RXzI3PW8zBvycGwSEqH+/mPQx/SF+XSwf/ANaSSI+ag=
75
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
86
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
97
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
108
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
11-
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
12-
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
139
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
1410
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
15-
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
16-
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
1711
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
1812
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
1913
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
2014
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
2115
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
2216
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
23-
github.com/open-feature/go-sdk v1.11.0 h1:4cp9rXl16ZvlMCef7O+I3vQSXae8DzAF0SfV9mvYInw=
24-
github.com/open-feature/go-sdk v1.11.0/go.mod h1:+rkJhLBtYsJ5PZNddAgFILhRAAxwrJ32aU7UEUm4zQI=
2517
github.com/open-feature/go-sdk v1.15.1 h1:TC3FtHtOKlGlIbSf3SEpxXVhgTd/bCbuc39XHIyltkw=
2618
github.com/open-feature/go-sdk v1.15.1/go.mod h1:2WAFYzt8rLYavcubpCoiym3iSCXiHdPB6DxtMkv2wyo=
2719
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
2820
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
29-
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
30-
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
31-
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
32-
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
21+
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
22+
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
3323
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
3424
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
3525
go.uber.org/mock v0.5.2 h1:LbtPTcP8A5k9WPXj54PPPbjcI4Y6lhyOZXn+VS7wNko=
3626
go.uber.org/mock v0.5.2/go.mod h1:wLlUxC2vVTPTaE3UD51E0BGOAElKrILxhVSDYQLld5o=
37-
golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo=
38-
golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08=
39-
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
40-
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
27+
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
28+
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
4129
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
4230
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
4331
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

providers/configcat/pkg/provider.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const (
2020
)
2121

2222
type userAttributes struct {
23-
attributes map[string]interface{}
23+
attributes map[string]any
2424
}
2525

2626
type Client interface {
@@ -86,7 +86,7 @@ func (p *Provider) IntEvaluation(ctx context.Context, flag string, defaultValue
8686
}
8787

8888
// ObjectEvaluation attempts to parse a string feature flag value as JSON.
89-
func (p *Provider) ObjectEvaluation(ctx context.Context, flag string, defaultValue interface{}, evalCtx openfeature.FlattenedContext) openfeature.InterfaceResolutionDetail {
89+
func (p *Provider) ObjectEvaluation(ctx context.Context, flag string, defaultValue any, evalCtx openfeature.FlattenedContext) openfeature.InterfaceResolutionDetail {
9090
evaluation := p.client.GetStringValueDetails(flag, "", toUserData(evalCtx))
9191
if evaluation.Data.IsDefaultValue || evaluation.Data.Error != nil {
9292
// we evaluated with a fake default value, so we
@@ -98,7 +98,7 @@ func (p *Provider) ObjectEvaluation(ctx context.Context, flag string, defaultVal
9898
}
9999

100100
// Attempt to unmarshal the string value as if it's JSON
101-
var object map[string]interface{}
101+
var object map[string]any
102102
err := json.Unmarshal([]byte(evaluation.Value), &object)
103103
if err != nil {
104104
return openfeature.InterfaceResolutionDetail{
@@ -118,7 +118,7 @@ func (p *Provider) ObjectEvaluation(ctx context.Context, flag string, defaultVal
118118
}
119119
}
120120

121-
func (u *userAttributes) GetAttribute(key string) interface{} {
121+
func (u *userAttributes) GetAttribute(key string) any {
122122
return u.attributes[key]
123123
}
124124

@@ -127,7 +127,7 @@ func toUserData(evalCtx openfeature.FlattenedContext) sdk.User {
127127
return nil
128128
}
129129

130-
attributes := make(map[string]interface{}, len(evalCtx))
130+
attributes := make(map[string]any, len(evalCtx))
131131
for key, val := range evalCtx {
132132
switch key {
133133
case IdentifierKey:

providers/configcat/pkg/provider_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func TestBooleanEvaluation(t *testing.T) {
4242
errMsg string
4343
errCode openfeature.ErrorCode
4444
reason openfeature.Reason
45-
evalCtx map[string]interface{}
45+
evalCtx map[string]any
4646
flag configcattest.Flag
4747
}{
4848
{
@@ -196,7 +196,7 @@ func TestStringEvaluation(t *testing.T) {
196196
errMsg string
197197
errCode openfeature.ErrorCode
198198
reason openfeature.Reason
199-
evalCtx map[string]interface{}
199+
evalCtx map[string]any
200200
flag configcattest.Flag
201201
}{
202202
{
@@ -350,7 +350,7 @@ func TestFloatEvaluation(t *testing.T) {
350350
errMsg string
351351
errCode openfeature.ErrorCode
352352
reason openfeature.Reason
353-
evalCtx map[string]interface{}
353+
evalCtx map[string]any
354354
flag configcattest.Flag
355355
}{
356356
{
@@ -504,7 +504,7 @@ func TestIntEvaluation(t *testing.T) {
504504
errMsg string
505505
errCode openfeature.ErrorCode
506506
reason openfeature.Reason
507-
evalCtx map[string]interface{}
507+
evalCtx map[string]any
508508
flag configcattest.Flag
509509
}{
510510
{
@@ -652,20 +652,20 @@ func TestObjectEvaluation(t *testing.T) {
652652
tests := []struct {
653653
name string
654654
key string
655-
defaultVal interface{}
656-
expVal interface{}
655+
defaultVal any
656+
expVal any
657657
expVariant string
658658
errMsg string
659659
errCode openfeature.ErrorCode
660660
reason openfeature.Reason
661-
evalCtx map[string]interface{}
661+
evalCtx map[string]any
662662
flag configcattest.Flag
663663
}{
664664
{
665665
name: "evalCtx empty",
666666
key: "flag",
667667
defaultVal: nil,
668-
expVal: map[string]interface{}{"name": "test"},
668+
expVal: map[string]any{"name": "test"},
669669
expVariant: "v_flag",
670670
errMsg: "",
671671
errCode: "",
@@ -733,7 +733,7 @@ func TestObjectEvaluation(t *testing.T) {
733733
name: "matched evaluation rule",
734734
key: "flag",
735735
defaultVal: nil,
736-
expVal: map[string]interface{}{"domain": "example.org"},
736+
expVal: map[string]any{"domain": "example.org"},
737737
expVariant: "v0_flag",
738738
errMsg: "",
739739
errCode: "",
@@ -753,7 +753,7 @@ func TestObjectEvaluation(t *testing.T) {
753753
name: "matched percentage rule",
754754
key: "flag",
755755
defaultVal: nil,
756-
expVal: map[string]interface{}{"domain": "example.org"},
756+
expVal: map[string]any{"domain": "example.org"},
757757
expVariant: "v0_flag",
758758
errMsg: "",
759759
errCode: "",
@@ -817,7 +817,7 @@ func testEvalCtxUserData(t *testing.T, cb func(evalCtx openfeature.FlattenedCont
817817
expectedCountry := "AQ"
818818
expectedSomeKey := "some-value"
819819

820-
details := cb(map[string]interface{}{
820+
details := cb(map[string]any{
821821
openfeature.TargetingKey: expectedIdentifier,
822822
configcat.EmailKey: expectedEmail,
823823
configcat.CountryKey: expectedCountry,

providers/flagsmith/go.mod

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module github.com/open-feature/go-sdk-contrib/providers/flagsmith
22

3-
go 1.23.0
4-
5-
toolchain go1.24.4
3+
go 1.24.0
64

75
require (
86
github.com/Flagsmith/flagsmith-go-client/v4 v4.4.0

providers/flagsmith/go.sum

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
github.com/Flagsmith/flagsmith-go-client/v3 v3.7.0 h1:3uQbIaLZIxuh8b3MzYAQmsHaCDUUQbqwVwUTdbHdq4E=
2-
github.com/Flagsmith/flagsmith-go-client/v3 v3.7.0/go.mod h1:bbGU66hX7Lx0fVIr56jF7dR4wlF+kIqTyKSTIRmCX1s=
31
github.com/Flagsmith/flagsmith-go-client/v4 v4.4.0 h1:EHJ82e/htosGhp7KyyjXjE16P0V08/t9oySQvNFhykc=
42
github.com/Flagsmith/flagsmith-go-client/v4 v4.4.0/go.mod h1:fxZEL7fqcWD2jozrPZrp2XDnZaLLmDCwWBymea4psAg=
53
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
@@ -29,13 +27,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
2927
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
3028
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
3129
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
32-
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
33-
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
34-
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
35-
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
3630
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
3731
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
38-
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
3932
go.uber.org/mock v0.5.2 h1:LbtPTcP8A5k9WPXj54PPPbjcI4Y6lhyOZXn+VS7wNko=
4033
go.uber.org/mock v0.5.2/go.mod h1:wLlUxC2vVTPTaE3UD51E0BGOAElKrILxhVSDYQLld5o=
4134
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b h1:M2rDM6z3Fhozi9O7NWsxAkg/yqS/lQJ6PmkyIV3YP+o=

providers/flagsmith/pkg/provider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func (p *Provider) Metadata() of.Metadata {
4040
}
4141
}
4242

43-
func (p *Provider) resolveFlag(ctx context.Context, flag string, defaultValue interface{}, evalCtx of.FlattenedContext) of.InterfaceResolutionDetail {
43+
func (p *Provider) resolveFlag(ctx context.Context, flag string, defaultValue any, evalCtx of.FlattenedContext) of.InterfaceResolutionDetail {
4444
var flags flagsmithClient.Flags
4545
var err error
4646

@@ -281,7 +281,7 @@ func (p *Provider) IntEvaluation(ctx context.Context, flag string, defaultValue
281281
}
282282
}
283283

284-
func (p *Provider) ObjectEvaluation(ctx context.Context, flag string, defaultValue interface{}, evalCtx of.FlattenedContext) of.InterfaceResolutionDetail {
284+
func (p *Provider) ObjectEvaluation(ctx context.Context, flag string, defaultValue any, evalCtx of.FlattenedContext) of.InterfaceResolutionDetail {
285285
res := p.resolveFlag(ctx, flag, defaultValue, evalCtx)
286286
resolutionDetails := res.ResolutionDetail()
287287

0 commit comments

Comments
 (0)