Skip to content

Commit

Permalink
Replace for loop with range
Browse files Browse the repository at this point in the history
  • Loading branch information
gruz0 committed May 13, 2024
1 parent e31078f commit 775b59c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/yamlanalyzer/yamlanalyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func traverse(value interface{}) []string {
}

if value.Kind() == reflect.Slice || value.Kind() == reflect.Array {
for i := 0; i < value.Len(); i++ {
for i := range make([]struct{}, value.Len()) {
processQueue(value.Index(i), fmt.Sprintf("%s[%d]", path, i))
}

Expand Down

0 comments on commit 775b59c

Please sign in to comment.