1
0

A struct DirStats was renamed to DirStat.

This commit is contained in:
Alexander Andreev 2023-09-20 04:07:24 +04:00
parent 99e39fc6c1
commit d6463e81e8
Signed by: Arav
GPG Key ID: D22A817D95815393
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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