A struct DirStats was renamed to DirStat.
This commit is contained in:
parent
99e39fc6c1
commit
d6463e81e8
@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
const FileDateFormat = "2006-01-02 15:04:05 MST"
|
const FileDateFormat = "2006-01-02 15:04:05 MST"
|
||||||
|
|
||||||
type DirStats struct {
|
type DirStat struct {
|
||||||
Files int64
|
Files int64
|
||||||
FilesSize string
|
FilesSize string
|
||||||
Directories int64
|
Directories int64
|
||||||
@ -22,7 +22,7 @@ type DirEntry struct {
|
|||||||
Size string
|
Size string
|
||||||
}
|
}
|
||||||
|
|
||||||
func ScanDirectory(path, urlBase string) (entries []DirEntry, stats DirStats, err error) {
|
func ScanDirectory(path, urlBase string) (entries []DirEntry, stats DirStat, err error) {
|
||||||
var dirEntries []DirEntry = make([]DirEntry, 0)
|
var dirEntries []DirEntry = make([]DirEntry, 0)
|
||||||
var fileEntries []DirEntry = make([]DirEntry, 0)
|
var fileEntries []DirEntry = make([]DirEntry, 0)
|
||||||
var totalFilesSize int64 = 0
|
var totalFilesSize int64 = 0
|
||||||
|
@ -5,7 +5,7 @@ block nav
|
|||||||
h1 Files
|
h1 Files
|
||||||
|
|
||||||
block content
|
block content
|
||||||
:go:func Index(title, mainSite, currentPath string, stats *files.DirStats, items *[]files.DirEntry, r *http.Request)
|
:go:func Index(title, mainSite, currentPath string, stats *files.DirStat, items *[]files.DirEntry, r *http.Request)
|
||||||
:go:import "dwelling-files/pkg/files"
|
:go:import "dwelling-files/pkg/files"
|
||||||
:go:import "dwelling-files/pkg/utils"
|
:go:import "dwelling-files/pkg/utils"
|
||||||
section
|
section
|
||||||
|
Loading…
Reference in New Issue
Block a user