added preload estimate quote usage

This commit is contained in:
ston1th 2022-10-11 23:03:46 +02:00
commit 088bd1f03e
5 changed files with 19 additions and 6 deletions

View file

@ -150,9 +150,10 @@ func (r *responseInterceptor) GetPaths(path string, filesystem *fs.FS, relative
return
}
func getPreloads(path string, filesystem *fs.FS) (dc dirContents) {
func getPreloads(path string, filesystem *fs.FS) (dc dirContents, size int64) {
dc.Base = path
for _, p := range filesystem.Preloads() {
size += p.Size
dc.Files = append(dc.Files, file{
Name: template.HTML(p.Name),
URI: template.HTML(urlencode(p.Name)),