chore: linter: intrange

Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
Jakob Borg
2025-10-21 08:36:42 +02:00
parent 465804161b
commit a1069a0d70
16 changed files with 22 additions and 22 deletions

View File

@@ -93,7 +93,7 @@ func FillNil(data any) {
func fillNil(data any, skipDeprecated bool) {
s := reflect.ValueOf(data).Elem()
t := s.Type()
for i := 0; i < s.NumField(); i++ {
for i := range s.NumField() {
if skipDeprecated && strings.HasPrefix(t.Field(i).Name, "Deprecated") {
continue
}
@@ -123,7 +123,7 @@ func fillNil(data any, skipDeprecated bool) {
if f.Type().Elem().Kind() != reflect.Struct {
continue
}
for i := 0; i < f.Len(); i++ {
for i := range f.Len() {
fillNil(f.Index(i).Addr().Interface(), skipDeprecated)
}
case reflect.Struct:
@@ -142,7 +142,7 @@ func FillNilSlices(data any) error {
s := reflect.ValueOf(data).Elem()
t := s.Type()
for i := 0; i < s.NumField(); i++ {
for i := range s.NumField() {
f := s.Field(i)
tag := t.Field(i).Tag