mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-26 05:30:54 +03:00
all: Run modernize -fix ./...
This commit is contained in:
parent
b7ae24b9c2
commit
521911a576
141 changed files with 302 additions and 354 deletions
|
@ -151,7 +151,7 @@ func structTypes(v reflect.Value, m map[reflect.Type]struct{}) {
|
|||
structTypes(v.Elem(), m)
|
||||
}
|
||||
case reflect.Slice, reflect.Array:
|
||||
for i := 0; i < v.Len(); i++ {
|
||||
for i := range v.Len() {
|
||||
structTypes(v.Index(i), m)
|
||||
}
|
||||
case reflect.Map:
|
||||
|
@ -160,7 +160,7 @@ func structTypes(v reflect.Value, m map[reflect.Type]struct{}) {
|
|||
}
|
||||
case reflect.Struct:
|
||||
m[v.Type()] = struct{}{}
|
||||
for i := 0; i < v.NumField(); i++ {
|
||||
for i := range v.NumField() {
|
||||
structTypes(v.Field(i), m)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue