@@ -93,10 +93,10 @@ func TestRequirements_1_3(t *testing.T) {
9393 StringValue (ctx context.Context , flag string , defaultValue string , evalCtx EvaluationContext , options ... Option ) (string , error )
9494 FloatValue (ctx context.Context , flag string , defaultValue float64 , evalCtx EvaluationContext , options ... Option ) (float64 , error )
9595 IntValue (ctx context.Context , flag string , defaultValue int64 , evalCtx EvaluationContext , options ... Option ) (int64 , error )
96- ObjectValue (ctx context.Context , flag string , defaultValue interface {} , evalCtx EvaluationContext , options ... Option ) (interface {} , error )
96+ ObjectValue (ctx context.Context , flag string , defaultValue any , evalCtx EvaluationContext , options ... Option ) (any , error )
9797 }
9898
99- var clientI interface {} = client
99+ var clientI any = client
100100 if _ , ok := clientI .(requirements ); ! ok {
101101 t .Error ("client returned by NewClient doesn't implement the 1.3.* requirements interface" )
102102 }
@@ -114,10 +114,10 @@ func TestRequirement_1_4_1(t *testing.T) {
114114 StringValueDetails (ctx context.Context , flag string , defaultValue string , evalCtx EvaluationContext , options ... Option ) (StringEvaluationDetails , error )
115115 FloatValueDetails (ctx context.Context , flag string , defaultValue float64 , evalCtx EvaluationContext , options ... Option ) (FloatEvaluationDetails , error )
116116 IntValueDetails (ctx context.Context , flag string , defaultValue int64 , evalCtx EvaluationContext , options ... Option ) (IntEvaluationDetails , error )
117- ObjectValueDetails (ctx context.Context , flag string , defaultValue interface {} , evalCtx EvaluationContext , options ... Option ) (InterfaceEvaluationDetails , error )
117+ ObjectValueDetails (ctx context.Context , flag string , defaultValue any , evalCtx EvaluationContext , options ... Option ) (InterfaceEvaluationDetails , error )
118118 }
119119
120- var clientI interface {} = client
120+ var clientI any = client
121121 if _ , ok := clientI .(requirements ); ! ok {
122122 t .Error ("client returned by NewClient doesn't implement the 1.4.1 requirements interface" )
123123 }
@@ -142,7 +142,7 @@ const (
142142 incorrectReason = "Incorrect reason returned!"
143143)
144144
145- var objectValue = map [string ]interface {} {"foo" : 1 , "bar" : true , "baz" : "buz" }
145+ var objectValue = map [string ]any {"foo" : 1 , "bar" : true , "baz" : "buz" }
146146
147147// Requirement_1_4_2
148148// The `evaluation details` structure's `value` field MUST contain the evaluated flag value.
@@ -780,7 +780,7 @@ func TestRequirement_6_1(t *testing.T) {
780780 Track (ctx context.Context , trackingEventName string , evalCtx EvaluationContext , details TrackingEventDetails )
781781 }
782782
783- var clientI interface {} = client
783+ var clientI any = client
784784 if _ , ok := clientI .(requirements ); ! ok {
785785 t .Error ("client returned by NewClient doesn't implement the 1.6.* requirements interface" )
786786 }
@@ -823,34 +823,34 @@ func TestTrack(t *testing.T) {
823823 eventName : "example-event" ,
824824 inCtx : inputCtx {
825825 api : EvaluationContext {
826- attributes : map [string ]interface {} {
826+ attributes : map [string ]any {
827827 "1" : "api" ,
828828 "2" : "api" ,
829829 "3" : "api" ,
830830 "4" : "api" ,
831831 },
832832 },
833833 txn : EvaluationContext {
834- attributes : map [string ]interface {} {
834+ attributes : map [string ]any {
835835 "2" : "txn" ,
836836 "3" : "txn" ,
837837 "4" : "txn" ,
838838 },
839839 },
840840 client : EvaluationContext {
841- attributes : map [string ]interface {} {
841+ attributes : map [string ]any {
842842 "3" : "client" ,
843843 "4" : "client" ,
844844 },
845845 },
846846 invocation : EvaluationContext {
847- attributes : map [string ]interface {} {
847+ attributes : map [string ]any {
848848 "4" : "invocation" ,
849849 },
850850 },
851851 },
852852 outCtx : EvaluationContext {
853- attributes : map [string ]interface {} {
853+ attributes : map [string ]any {
854854 "1" : "api" ,
855855 "2" : "txn" ,
856856 "3" : "client" ,
@@ -907,7 +907,7 @@ func TestFlattenContext(t *testing.T) {
907907 }{
908908 "happy path" : {
909909 inCtx : EvaluationContext {
910- attributes : map [string ]interface {} {
910+ attributes : map [string ]any {
911911 "1" : "string" ,
912912 "2" : 0.01 ,
913913 "3" : false ,
@@ -923,7 +923,7 @@ func TestFlattenContext(t *testing.T) {
923923 },
924924 "no targeting key" : {
925925 inCtx : EvaluationContext {
926- attributes : map [string ]interface {} {
926+ attributes : map [string ]any {
927927 "1" : "string" ,
928928 "2" : 0.01 ,
929929 "3" : false ,
@@ -938,7 +938,7 @@ func TestFlattenContext(t *testing.T) {
938938 "duplicated key" : {
939939 inCtx : EvaluationContext {
940940 targetingKey : "user" ,
941- attributes : map [string ]interface {} {
941+ attributes : map [string ]any {
942942 TargetingKey : "not user" ,
943943 "1" : "string" ,
944944 "2" : 0.01 ,
@@ -987,7 +987,7 @@ func TestBeforeHookNilContext(t *testing.T) {
987987 mocks := hydratedMocksForClientTests (t , 1 )
988988 client := newClient ("test-client" , mocks .evaluationAPI , mocks .clientHandlerAPI )
989989
990- attributes := map [string ]interface {} {"should" : "persist" }
990+ attributes := map [string ]any {"should" : "persist" }
991991 evalCtx := EvaluationContext {attributes : attributes }
992992 mocks .providerAPI .EXPECT ().BooleanEvaluation (gomock .Any (), gomock .Any (), gomock .Any (), attributes )
993993
@@ -1034,7 +1034,7 @@ func TestObjectEvaluationShouldSupportNilValue(t *testing.T) {
10341034
10351035 variant := "variant1"
10361036 reason := TargetingMatchReason
1037- var value interface {} = nil
1037+ var value any = nil
10381038
10391039 mocks := hydratedMocksForClientTests (t , 1 )
10401040 client := newClient ("test-client" , mocks .evaluationAPI , mocks .clientHandlerAPI )
@@ -1192,7 +1192,7 @@ func TestRequirement_1_7_1(t *testing.T) {
11921192 State () State
11931193 }
11941194
1195- var clientI interface {} = client
1195+ var clientI any = client
11961196 if _ , ok := clientI .(requirements ); ! ok {
11971197 t .Fatal ("client des not define a status accessor which indicates the readiness of the associated provider" )
11981198 }
0 commit comments