@@ -120,7 +120,7 @@ func TestStringEvaluation(t *testing.T) {
120120
121121 evalCtx := of .NewEvaluationContext (
122122 "" ,
123- map [string ]interface {} {},
123+ map [string ]any {},
124124 )
125125 value , _ := ofClient .StringValue (context .Background (), "variant-flag" , "" , evalCtx )
126126 if value == "" {
@@ -129,15 +129,15 @@ func TestStringEvaluation(t *testing.T) {
129129}
130130
131131func TestBooleanEvaluationByUser (t * testing.T ) {
132- resolution := provider .BooleanEvaluation (context .Background (), "users-flag" , false , map [string ]interface {} {
132+ resolution := provider .BooleanEvaluation (context .Background (), "users-flag" , false , map [string ]any {
133133 "UserId" : "111" ,
134134 })
135135 enabled , _ := resolution .ProviderResolutionDetail .FlagMetadata .GetBool ("enabled" )
136136 if enabled == false {
137137 t .Fatalf ("Expected feature to be enabled" )
138138 }
139139
140- resolution = provider .BooleanEvaluation (context .Background (), "users-flag" , false , map [string ]interface {} {
140+ resolution = provider .BooleanEvaluation (context .Background (), "users-flag" , false , map [string ]any {
141141 "UserId" : "2" ,
142142 })
143143 enabled , _ = resolution .ProviderResolutionDetail .FlagMetadata .GetBool ("enabled" )
@@ -147,7 +147,7 @@ func TestBooleanEvaluationByUser(t *testing.T) {
147147
148148 evalCtx := of .NewEvaluationContext (
149149 "" ,
150- map [string ]interface {} {
150+ map [string ]any {
151151 "UserId" : "111" ,
152152 "AppName" : "test-app" ,
153153 "CurrentTime" : "2006-01-02T15:04:05Z" ,
@@ -163,7 +163,7 @@ func TestBooleanEvaluationByUser(t *testing.T) {
163163}
164164
165165func TestStringEvaluationByCurrentTime (t * testing.T ) {
166- resolution := provider .StringEvaluation (context .Background (), "variant-flag-by-date" , "fallback" , map [string ]interface {} {
166+ resolution := provider .StringEvaluation (context .Background (), "variant-flag-by-date" , "fallback" , map [string ]any {
167167 "UserId" : "2" ,
168168 "CurrentTime" : "2025-01-02T15:04:05Z" ,
169169 })
@@ -179,7 +179,7 @@ func TestStringEvaluationByCurrentTime(t *testing.T) {
179179 t .Fatalf ("Expected one of the variant payloads" )
180180 }
181181
182- resolution = provider .StringEvaluation (context .Background (), "variant-flag-by-date" , "fallback" , map [string ]interface {} {
182+ resolution = provider .StringEvaluation (context .Background (), "variant-flag-by-date" , "fallback" , map [string ]any {
183183 "UserId" : "2" ,
184184 "CurrentTime" : "2023-01-02T15:04:05Z" ,
185185 })
@@ -204,9 +204,9 @@ func TestInvalidContextEvaluation(t *testing.T) {
204204func TestEvaluationMethods (t * testing.T ) {
205205 tests := []struct {
206206 flag string
207- defaultValue interface {}
207+ defaultValue any
208208 evalCtx of.FlattenedContext
209- expected interface {}
209+ expected any
210210 expectedError string
211211 }{
212212 {flag : "DateExample" , defaultValue : false , evalCtx : of.FlattenedContext {}, expected : true , expectedError : "" },
@@ -222,7 +222,7 @@ func TestEvaluationMethods(t *testing.T) {
222222
223223 {"float" , 1.23 , of.FlattenedContext {"UserID" : "123" }, 1.23 , "flag not found" },
224224 {"number" , int64 (43 ), of.FlattenedContext {"UserID" : "123" }, int64 (43 ), "flag not found" },
225- {"object" , map [string ]interface {}{ "key1" : "other-value" }, of.FlattenedContext {"UserID" : "123" }, map [string ]interface {} {"key1" : "other-value" }, "flag not found" },
225+ {"object" , map [string ]any { "key1" : "other-value" }, of.FlattenedContext {"UserID" : "123" }, map [string ]any {"key1" : "other-value" }, "flag not found" },
226226 {"string" , "value2" , of.FlattenedContext {"UserID" : "123" }, "value2" , "flag not found" },
227227
228228 {"invalid_user_context" , false , of.FlattenedContext {"UserID" : "123" , "invalid" : "value" }, false , "" },
0 commit comments