@@ -188,7 +188,7 @@ func bindData(destination any, data map[string][]string, tag string, dataFiles m
188188 typeField := typ .Field (i )
189189 structField := val .Field (i )
190190 if typeField .Anonymous {
191- if structField .Kind () == reflect .Ptr {
191+ if structField .Kind () == reflect .Pointer {
192192 structField = structField .Elem ()
193193 }
194194 }
@@ -273,7 +273,7 @@ func bindData(destination any, data map[string][]string, tag string, dataFiles m
273273 sliceOf := structField .Type ().Elem ().Kind ()
274274 numElems := len (inputValue )
275275 slice := reflect .MakeSlice (structField .Type (), numElems , numElems )
276- for j := 0 ; j < numElems ; j ++ {
276+ for j := range numElems {
277277 if err := setWithProperType (sliceOf , inputValue [j ], slice .Index (j )); err != nil {
278278 return err
279279 }
@@ -297,7 +297,7 @@ func setWithProperType(valueKind reflect.Kind, val string, structField reflect.V
297297 }
298298
299299 switch valueKind {
300- case reflect .Ptr :
300+ case reflect .Pointer :
301301 return setWithProperType (structField .Elem ().Kind (), val , structField .Elem ())
302302 case reflect .Int :
303303 return setIntField (val , 0 , structField )
@@ -334,7 +334,7 @@ func setWithProperType(valueKind reflect.Kind, val string, structField reflect.V
334334}
335335
336336func unmarshalInputsToField (valueKind reflect.Kind , values []string , field reflect.Value ) (bool , error ) {
337- if valueKind == reflect .Ptr {
337+ if valueKind == reflect .Pointer {
338338 if field .IsNil () {
339339 field .Set (reflect .New (field .Type ().Elem ()))
340340 }
@@ -350,7 +350,7 @@ func unmarshalInputsToField(valueKind reflect.Kind, values []string, field refle
350350}
351351
352352func unmarshalInputToField (valueKind reflect.Kind , val string , field reflect.Value , formatTag string ) (bool , error ) {
353- if valueKind == reflect .Ptr {
353+ if valueKind == reflect .Pointer {
354354 if field .IsNil () {
355355 field .Set (reflect .New (field .Type ().Elem ()))
356356 }
0 commit comments