mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-14 20:33:59 +02:00
all: Apply staticcheck recommendations
This commit is contained in:
@@ -14,8 +14,6 @@
|
||||
package source
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@@ -23,8 +21,6 @@ import (
|
||||
|
||||
"github.com/gohugoio/hugo/common/hugio"
|
||||
|
||||
"github.com/spf13/afero"
|
||||
|
||||
"github.com/gohugoio/hugo/hugofs"
|
||||
|
||||
"github.com/gohugoio/hugo/helpers"
|
||||
@@ -286,24 +282,3 @@ func (sp *SourceSpec) NewFileInfo(baseDir, filename string, isLeafBundle bool, f
|
||||
return f
|
||||
|
||||
}
|
||||
|
||||
func printFs(fs afero.Fs, path string, w io.Writer) {
|
||||
if fs == nil {
|
||||
return
|
||||
}
|
||||
afero.Walk(fs, path, func(path string, info os.FileInfo, err error) error {
|
||||
|
||||
if info != nil && !info.IsDir() {
|
||||
|
||||
s := path
|
||||
if lang, ok := info.(hugofs.LanguageAnnouncer); ok {
|
||||
s = s + "\t" + lang.Lang()
|
||||
}
|
||||
if fp, ok := info.(hugofs.FilePather); ok {
|
||||
s = s + "\t" + fp.Filename()
|
||||
}
|
||||
fmt.Fprintln(w, " ", s)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user