@@ -75,7 +75,7 @@ type BindingError struct {
7575}
7676
7777// NewBindingError creates new instance of binding error
78- func NewBindingError (sourceParam string , values []string , message interface {} , internalError error ) error {
78+ func NewBindingError (sourceParam string , values []string , message any , internalError error ) error {
7979 return & BindingError {
8080 Field : sourceParam ,
8181 Values : values ,
@@ -103,7 +103,7 @@ type ValueBinder struct {
103103 // ValuesFunc is used to get all values for parameter from request. i.e. `/api/search?ids=1&ids=2`
104104 ValuesFunc func (sourceParam string ) []string
105105 // ErrorFunc is used to create errors. Allows you to use your own error type, that for example marshals to your specific json response
106- ErrorFunc func (sourceParam string , values []string , message interface {} , internalError error ) error
106+ ErrorFunc func (sourceParam string , values []string , message any , internalError error ) error
107107}
108108
109109// QueryParamsBinder creates query parameter value binder
@@ -403,17 +403,17 @@ func (b *ValueBinder) MustTextUnmarshaler(sourceParam string, dest encoding.Text
403403
404404// BindWithDelimiter binds parameter to destination by suitable conversion function.
405405// Delimiter is used before conversion to split parameter value to separate values
406- func (b * ValueBinder ) BindWithDelimiter (sourceParam string , dest interface {} , delimiter string ) * ValueBinder {
406+ func (b * ValueBinder ) BindWithDelimiter (sourceParam string , dest any , delimiter string ) * ValueBinder {
407407 return b .bindWithDelimiter (sourceParam , dest , delimiter , false )
408408}
409409
410410// MustBindWithDelimiter requires parameter value to exist to bind destination by suitable conversion function.
411411// Delimiter is used before conversion to split parameter value to separate values
412- func (b * ValueBinder ) MustBindWithDelimiter (sourceParam string , dest interface {} , delimiter string ) * ValueBinder {
412+ func (b * ValueBinder ) MustBindWithDelimiter (sourceParam string , dest any , delimiter string ) * ValueBinder {
413413 return b .bindWithDelimiter (sourceParam , dest , delimiter , true )
414414}
415415
416- func (b * ValueBinder ) bindWithDelimiter (sourceParam string , dest interface {} , delimiter string , valueMustExist bool ) * ValueBinder {
416+ func (b * ValueBinder ) bindWithDelimiter (sourceParam string , dest any , delimiter string , valueMustExist bool ) * ValueBinder {
417417 if b .failFast && b .errors != nil {
418418 return b
419419 }
@@ -501,7 +501,7 @@ func (b *ValueBinder) MustInt(sourceParam string, dest *int) *ValueBinder {
501501 return b .intValue (sourceParam , dest , 0 , true )
502502}
503503
504- func (b * ValueBinder ) intValue (sourceParam string , dest interface {} , bitSize int , valueMustExist bool ) * ValueBinder {
504+ func (b * ValueBinder ) intValue (sourceParam string , dest any , bitSize int , valueMustExist bool ) * ValueBinder {
505505 if b .failFast && b .errors != nil {
506506 return b
507507 }
@@ -517,7 +517,7 @@ func (b *ValueBinder) intValue(sourceParam string, dest interface{}, bitSize int
517517 return b .int (sourceParam , value , dest , bitSize )
518518}
519519
520- func (b * ValueBinder ) int (sourceParam string , value string , dest interface {} , bitSize int ) * ValueBinder {
520+ func (b * ValueBinder ) int (sourceParam string , value string , dest any , bitSize int ) * ValueBinder {
521521 n , err := strconv .ParseInt (value , 10 , bitSize )
522522 if err != nil {
523523 if bitSize == 0 {
@@ -543,7 +543,7 @@ func (b *ValueBinder) int(sourceParam string, value string, dest interface{}, bi
543543 return b
544544}
545545
546- func (b * ValueBinder ) intsValue (sourceParam string , dest interface {} , valueMustExist bool ) * ValueBinder {
546+ func (b * ValueBinder ) intsValue (sourceParam string , dest any , valueMustExist bool ) * ValueBinder {
547547 if b .failFast && b .errors != nil {
548548 return b
549549 }
@@ -558,7 +558,7 @@ func (b *ValueBinder) intsValue(sourceParam string, dest interface{}, valueMustE
558558 return b .ints (sourceParam , values , dest )
559559}
560560
561- func (b * ValueBinder ) ints (sourceParam string , values []string , dest interface {} ) * ValueBinder {
561+ func (b * ValueBinder ) ints (sourceParam string , values []string , dest any ) * ValueBinder {
562562 switch d := dest .(type ) {
563563 case * []int64 :
564564 tmp := make ([]int64 , len (values ))
@@ -729,7 +729,7 @@ func (b *ValueBinder) MustUint(sourceParam string, dest *uint) *ValueBinder {
729729 return b .uintValue (sourceParam , dest , 0 , true )
730730}
731731
732- func (b * ValueBinder ) uintValue (sourceParam string , dest interface {} , bitSize int , valueMustExist bool ) * ValueBinder {
732+ func (b * ValueBinder ) uintValue (sourceParam string , dest any , bitSize int , valueMustExist bool ) * ValueBinder {
733733 if b .failFast && b .errors != nil {
734734 return b
735735 }
@@ -745,7 +745,7 @@ func (b *ValueBinder) uintValue(sourceParam string, dest interface{}, bitSize in
745745 return b .uint (sourceParam , value , dest , bitSize )
746746}
747747
748- func (b * ValueBinder ) uint (sourceParam string , value string , dest interface {} , bitSize int ) * ValueBinder {
748+ func (b * ValueBinder ) uint (sourceParam string , value string , dest any , bitSize int ) * ValueBinder {
749749 n , err := strconv .ParseUint (value , 10 , bitSize )
750750 if err != nil {
751751 if bitSize == 0 {
@@ -771,7 +771,7 @@ func (b *ValueBinder) uint(sourceParam string, value string, dest interface{}, b
771771 return b
772772}
773773
774- func (b * ValueBinder ) uintsValue (sourceParam string , dest interface {} , valueMustExist bool ) * ValueBinder {
774+ func (b * ValueBinder ) uintsValue (sourceParam string , dest any , valueMustExist bool ) * ValueBinder {
775775 if b .failFast && b .errors != nil {
776776 return b
777777 }
@@ -786,7 +786,7 @@ func (b *ValueBinder) uintsValue(sourceParam string, dest interface{}, valueMust
786786 return b .uints (sourceParam , values , dest )
787787}
788788
789- func (b * ValueBinder ) uints (sourceParam string , values []string , dest interface {} ) * ValueBinder {
789+ func (b * ValueBinder ) uints (sourceParam string , values []string , dest any ) * ValueBinder {
790790 switch d := dest .(type ) {
791791 case * []uint64 :
792792 tmp := make ([]uint64 , len (values ))
@@ -992,7 +992,7 @@ func (b *ValueBinder) MustFloat32(sourceParam string, dest *float32) *ValueBinde
992992 return b .floatValue (sourceParam , dest , 32 , true )
993993}
994994
995- func (b * ValueBinder ) floatValue (sourceParam string , dest interface {} , bitSize int , valueMustExist bool ) * ValueBinder {
995+ func (b * ValueBinder ) floatValue (sourceParam string , dest any , bitSize int , valueMustExist bool ) * ValueBinder {
996996 if b .failFast && b .errors != nil {
997997 return b
998998 }
@@ -1008,7 +1008,7 @@ func (b *ValueBinder) floatValue(sourceParam string, dest interface{}, bitSize i
10081008 return b .float (sourceParam , value , dest , bitSize )
10091009}
10101010
1011- func (b * ValueBinder ) float (sourceParam string , value string , dest interface {} , bitSize int ) * ValueBinder {
1011+ func (b * ValueBinder ) float (sourceParam string , value string , dest any , bitSize int ) * ValueBinder {
10121012 n , err := strconv .ParseFloat (value , bitSize )
10131013 if err != nil {
10141014 b .setError (b .ErrorFunc (sourceParam , []string {value }, fmt .Sprintf ("failed to bind field value to float%v" , bitSize ), err ))
@@ -1024,7 +1024,7 @@ func (b *ValueBinder) float(sourceParam string, value string, dest interface{},
10241024 return b
10251025}
10261026
1027- func (b * ValueBinder ) floatsValue (sourceParam string , dest interface {} , valueMustExist bool ) * ValueBinder {
1027+ func (b * ValueBinder ) floatsValue (sourceParam string , dest any , valueMustExist bool ) * ValueBinder {
10281028 if b .failFast && b .errors != nil {
10291029 return b
10301030 }
@@ -1039,7 +1039,7 @@ func (b *ValueBinder) floatsValue(sourceParam string, dest interface{}, valueMus
10391039 return b .floats (sourceParam , values , dest )
10401040}
10411041
1042- func (b * ValueBinder ) floats (sourceParam string , values []string , dest interface {} ) * ValueBinder {
1042+ func (b * ValueBinder ) floats (sourceParam string , values []string , dest any ) * ValueBinder {
10431043 switch d := dest .(type ) {
10441044 case * []float64 :
10451045 tmp := make ([]float64 , len (values ))
0 commit comments