@@ -22,7 +22,7 @@ func parseExpression(in string) (hpredicate, error) {
2222 GT : gt ,
2323 GE : ge ,
2424 },
25- Functions : map [string ]interface {} {
25+ Functions : map [string ]any {
2626 "LatencyAtQuantileMS" : latencyAtQuantile ,
2727 "NetworkErrorRatio" : networkErrorRatio ,
2828 "ResponseCodeRatio" : responseCodeRatio ,
@@ -107,7 +107,7 @@ func not(p hpredicate) hpredicate {
107107}
108108
109109// eq returns predicate that tests for equality of the value of the mapper and the constant.
110- func eq (m interface {} , value interface {} ) (hpredicate , error ) {
110+ func eq (m any , value any ) (hpredicate , error ) {
111111 switch mapper := m .(type ) {
112112 case toInt :
113113 return intEQ (mapper , value )
@@ -119,7 +119,7 @@ func eq(m interface{}, value interface{}) (hpredicate, error) {
119119}
120120
121121// neq returns predicate that tests for inequality of the value of the mapper and the constant.
122- func neq (m interface {} , value interface {} ) (hpredicate , error ) {
122+ func neq (m any , value any ) (hpredicate , error ) {
123123 p , err := eq (m , value )
124124 if err != nil {
125125 return nil , err
@@ -129,7 +129,7 @@ func neq(m interface{}, value interface{}) (hpredicate, error) {
129129}
130130
131131// lt returns predicate that tests that value of the mapper function is less than the constant.
132- func lt (m interface {} , value interface {} ) (hpredicate , error ) {
132+ func lt (m any , value any ) (hpredicate , error ) {
133133 switch mapper := m .(type ) {
134134 case toInt :
135135 return intLT (mapper , value )
@@ -141,7 +141,7 @@ func lt(m interface{}, value interface{}) (hpredicate, error) {
141141}
142142
143143// le returns predicate that tests that value of the mapper function is less or equal than the constant.
144- func le (m interface {} , value interface {} ) (hpredicate , error ) {
144+ func le (m any , value any ) (hpredicate , error ) {
145145 l , err := lt (m , value )
146146 if err != nil {
147147 return nil , err
@@ -158,7 +158,7 @@ func le(m interface{}, value interface{}) (hpredicate, error) {
158158}
159159
160160// gt returns predicate that tests that value of the mapper function is greater than the constant.
161- func gt (m interface {} , value interface {} ) (hpredicate , error ) {
161+ func gt (m any , value any ) (hpredicate , error ) {
162162 switch mapper := m .(type ) {
163163 case toInt :
164164 return intGT (mapper , value )
@@ -170,7 +170,7 @@ func gt(m interface{}, value interface{}) (hpredicate, error) {
170170}
171171
172172// ge returns predicate that tests that value of the mapper function is less or equal than the constant.
173- func ge (m interface {} , value interface {} ) (hpredicate , error ) {
173+ func ge (m any , value any ) (hpredicate , error ) {
174174 g , err := gt (m , value )
175175 if err != nil {
176176 return nil , err
@@ -186,7 +186,7 @@ func ge(m interface{}, value interface{}) (hpredicate, error) {
186186 }, nil
187187}
188188
189- func intEQ (m toInt , val interface {} ) (hpredicate , error ) {
189+ func intEQ (m toInt , val any ) (hpredicate , error ) {
190190 value , ok := val .(int )
191191 if ! ok {
192192 return nil , fmt .Errorf ("expected int, got %T" , val )
@@ -197,7 +197,7 @@ func intEQ(m toInt, val interface{}) (hpredicate, error) {
197197 }, nil
198198}
199199
200- func float64EQ (m toFloat64 , val interface {} ) (hpredicate , error ) {
200+ func float64EQ (m toFloat64 , val any ) (hpredicate , error ) {
201201 value , ok := val .(float64 )
202202 if ! ok {
203203 return nil , fmt .Errorf ("expected float64, got %T" , val )
@@ -208,7 +208,7 @@ func float64EQ(m toFloat64, val interface{}) (hpredicate, error) {
208208 }, nil
209209}
210210
211- func intLT (m toInt , val interface {} ) (hpredicate , error ) {
211+ func intLT (m toInt , val any ) (hpredicate , error ) {
212212 value , ok := val .(int )
213213 if ! ok {
214214 return nil , fmt .Errorf ("expected int, got %T" , val )
@@ -219,7 +219,7 @@ func intLT(m toInt, val interface{}) (hpredicate, error) {
219219 }, nil
220220}
221221
222- func intGT (m toInt , val interface {} ) (hpredicate , error ) {
222+ func intGT (m toInt , val any ) (hpredicate , error ) {
223223 value , ok := val .(int )
224224 if ! ok {
225225 return nil , fmt .Errorf ("expected int, got %T" , val )
@@ -230,7 +230,7 @@ func intGT(m toInt, val interface{}) (hpredicate, error) {
230230 }, nil
231231}
232232
233- func float64LT (m toFloat64 , val interface {} ) (hpredicate , error ) {
233+ func float64LT (m toFloat64 , val any ) (hpredicate , error ) {
234234 value , ok := val .(float64 )
235235 if ! ok {
236236 return nil , fmt .Errorf ("expected int, got %T" , val )
@@ -241,7 +241,7 @@ func float64LT(m toFloat64, val interface{}) (hpredicate, error) {
241241 }, nil
242242}
243243
244- func float64GT (m toFloat64 , val interface {} ) (hpredicate , error ) {
244+ func float64GT (m toFloat64 , val any ) (hpredicate , error ) {
245245 value , ok := val .(float64 )
246246 if ! ok {
247247 return nil , fmt .Errorf ("expected int, got %T" , val )
0 commit comments