mirror of
https://github.com/gohugoio/hugo.git
synced 2025-09-08 23:40:40 +02:00
all: Remove unused code
Using x/tools/cmd/deadcode
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
package hugofs
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
@@ -28,8 +29,6 @@ import (
|
||||
"github.com/gohugoio/hugo/hugofs/files"
|
||||
"golang.org/x/text/unicode/norm"
|
||||
|
||||
"errors"
|
||||
|
||||
"github.com/gohugoio/hugo/common/hreflect"
|
||||
"github.com/gohugoio/hugo/common/htime"
|
||||
|
||||
@@ -224,7 +223,8 @@ func newDirNameOnlyFileInfo(name string, meta *FileMeta, fileOpener func() (afer
|
||||
func decorateFileInfo(
|
||||
fi os.FileInfo,
|
||||
fs afero.Fs, opener func() (afero.File, error),
|
||||
filename, filepath string, inMeta *FileMeta) FileMetaInfo {
|
||||
filename, filepath string, inMeta *FileMeta,
|
||||
) FileMetaInfo {
|
||||
var meta *FileMeta
|
||||
var fim FileMetaInfo
|
||||
|
||||
@@ -289,13 +289,6 @@ func fileInfosToNames(fis []os.FileInfo) []string {
|
||||
return names
|
||||
}
|
||||
|
||||
func fromSlash(filenames []string) []string {
|
||||
for i, name := range filenames {
|
||||
filenames[i] = filepath.FromSlash(name)
|
||||
}
|
||||
return filenames
|
||||
}
|
||||
|
||||
func sortFileInfos(fis []os.FileInfo) {
|
||||
sort.Slice(fis, func(i, j int) bool {
|
||||
fimi, fimj := fis[i].(FileMetaInfo), fis[j].(FileMetaInfo)
|
||||
|
Reference in New Issue
Block a user