Files
seaweedFS/weed/server/filer_ui/templates.go
promalert 9012069bd7 chore: execute goimports to format the code (#7983)
* chore: execute goimports to format the code

Signed-off-by: promalert <promalert@outlook.com>

* goimports -w .

---------

Signed-off-by: promalert <promalert@outlook.com>
Co-authored-by: Chris Lu <chris.lu@gmail.com>
2026-01-07 13:06:08 -08:00

27 lines
504 B
Go

package filer_ui
import (
_ "embed"
"html/template"
"net/url"
"strings"
"github.com/dustin/go-humanize"
)
func printpath(parts ...string) string {
concat := strings.Join(parts, "")
escaped := url.PathEscape(concat)
return strings.ReplaceAll(escaped, "%2F", "/")
}
var funcMap = template.FuncMap{
"humanizeBytes": humanize.Bytes,
"printpath": printpath,
}
//go:embed filer.html
var filerHtml string
var StatusTpl = template.Must(template.New("status").Funcs(funcMap).Parse(filerHtml))