diff options
author | Bjørn Erik Pedersen <[email protected]> | 2022-03-17 22:03:27 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2022-03-17 22:03:27 +0100 |
commit | b80853de90b10171155b8f3fde47d64ec7bfa0dd (patch) | |
tree | 435d3dbf7a495a0c6ce64c9769e037179aa0d27b /hugofs/rootmapping_fs.go | |
parent | 423594e03a906ef4150f433666ff588b022c3c92 (diff) | |
download | hugo-b80853de90b10171155b8f3fde47d64ec7bfa0dd.tar.gz hugo-b80853de90b10171155b8f3fde47d64ec7bfa0dd.zip |
all: gofmt -w -r 'interface{} -> any' .
Updates #9687
Diffstat (limited to 'hugofs/rootmapping_fs.go')
-rw-r--r-- | hugofs/rootmapping_fs.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hugofs/rootmapping_fs.go b/hugofs/rootmapping_fs.go index 9fdce3ad7..28458155c 100644 --- a/hugofs/rootmapping_fs.go +++ b/hugofs/rootmapping_fs.go @@ -203,7 +203,7 @@ func (fs *RootMappingFs) Dirs(base string) ([]FileMetaInfo, error) { // Filter creates a copy of this filesystem with only mappings matching a filter. func (fs RootMappingFs) Filter(f func(m RootMapping) bool) *RootMappingFs { rootMapToReal := radix.New() - fs.rootMapToReal.Walk(func(b string, v interface{}) bool { + fs.rootMapToReal.Walk(func(b string, v any) bool { rms := v.([]RootMapping) var nrms []RootMapping for _, rm := range rms { @@ -250,7 +250,7 @@ func (fs *RootMappingFs) Stat(name string) (os.FileInfo, error) { func (fs *RootMappingFs) hasPrefix(prefix string) bool { hasPrefix := false - fs.rootMapToReal.WalkPrefix(prefix, func(b string, v interface{}) bool { + fs.rootMapToReal.WalkPrefix(prefix, func(b string, v any) bool { hasPrefix = true return true }) @@ -277,7 +277,7 @@ func (fs *RootMappingFs) getRoots(key string) (string, []RootMapping) { func (fs *RootMappingFs) debug() { fmt.Println("debug():") - fs.rootMapToReal.Walk(func(s string, v interface{}) bool { + fs.rootMapToReal.Walk(func(s string, v any) bool { fmt.Println("Key", s) return false }) @@ -285,7 +285,7 @@ func (fs *RootMappingFs) debug() { func (fs *RootMappingFs) getRootsWithPrefix(prefix string) []RootMapping { var roots []RootMapping - fs.rootMapToReal.WalkPrefix(prefix, func(b string, v interface{}) bool { + fs.rootMapToReal.WalkPrefix(prefix, func(b string, v any) bool { roots = append(roots, v.([]RootMapping)...) return false }) @@ -295,7 +295,7 @@ func (fs *RootMappingFs) getRootsWithPrefix(prefix string) []RootMapping { func (fs *RootMappingFs) getAncestors(prefix string) []keyRootMappings { var roots []keyRootMappings - fs.rootMapToReal.WalkPath(prefix, func(s string, v interface{}) bool { + fs.rootMapToReal.WalkPath(prefix, func(s string, v any) bool { if strings.HasPrefix(prefix, s+filepathSeparator) { roots = append(roots, keyRootMappings{ key: s, @@ -416,7 +416,7 @@ func (fs *RootMappingFs) collectDirEntries(prefix string) ([]os.FileInfo, error) // Next add any file mounts inside the given directory. prefixInside := prefix + filepathSeparator - fs.rootMapToReal.WalkPrefix(prefixInside, func(s string, v interface{}) bool { + fs.rootMapToReal.WalkPrefix(prefixInside, func(s string, v any) bool { if (strings.Count(s, filepathSeparator) - level) != 1 { // This directory is not part of the current, but we // need to include the first name part to make it |