go fmt
This commit is contained in:
@@ -158,28 +158,28 @@ var ExtensionTypes = map[string]string{
|
||||
}
|
||||
|
||||
type Options struct {
|
||||
TopDir string
|
||||
Filter string
|
||||
OutputFile string
|
||||
DirAppend bool
|
||||
Recursive bool
|
||||
IncludeHidden bool
|
||||
ExcludeRegex *regexp.Regexp
|
||||
Verbose bool
|
||||
TopDir string
|
||||
Filter string
|
||||
OutputFile string
|
||||
DirAppend bool
|
||||
Recursive bool
|
||||
IncludeHidden bool
|
||||
ExcludeRegex *regexp.Regexp
|
||||
Verbose bool
|
||||
}
|
||||
|
||||
type FileEntry struct {
|
||||
Name string
|
||||
Path string
|
||||
IsDir bool
|
||||
IsSymlink bool
|
||||
Size int64
|
||||
ModTime time.Time
|
||||
IconType string
|
||||
CSSClass string
|
||||
SizePretty string
|
||||
ModTimeISO string
|
||||
ModTimeHuman string
|
||||
Name string
|
||||
Path string
|
||||
IsDir bool
|
||||
IsSymlink bool
|
||||
Size int64
|
||||
ModTime time.Time
|
||||
IconType string
|
||||
CSSClass string
|
||||
SizePretty string
|
||||
ModTimeISO string
|
||||
ModTimeHuman string
|
||||
}
|
||||
|
||||
func ProcessDir(topDir string, opts *Options) error {
|
||||
@@ -215,14 +215,14 @@ func ProcessDir(topDir string, opts *Options) error {
|
||||
})
|
||||
|
||||
templateData := struct {
|
||||
DirName string
|
||||
Entries []FileEntry
|
||||
DirAppend bool
|
||||
DirName string
|
||||
Entries []FileEntry
|
||||
DirAppend bool
|
||||
OutputFile string
|
||||
}{
|
||||
DirName: dirName,
|
||||
Entries: entries,
|
||||
DirAppend: opts.DirAppend,
|
||||
DirName: dirName,
|
||||
Entries: entries,
|
||||
DirAppend: opts.DirAppend,
|
||||
OutputFile: opts.OutputFile,
|
||||
}
|
||||
|
||||
@@ -282,9 +282,9 @@ func ReadDirEntries(dirPath string, opts *Options) ([]FileEntry, error) {
|
||||
}
|
||||
|
||||
entry := FileEntry{
|
||||
Name: fileName,
|
||||
Path: fileName,
|
||||
IsDir: file.IsDir(),
|
||||
Name: fileName,
|
||||
Path: fileName,
|
||||
IsDir: file.IsDir(),
|
||||
ModTime: info.ModTime(),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user