aboutsummaryrefslogtreecommitdiffstats
path: root/modules/templates/helper.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/templates/helper.go')
-rw-r--r--modules/templates/helper.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go
index 2e756ce364..51877f8039 100644
--- a/modules/templates/helper.go
+++ b/modules/templates/helper.go
@@ -82,6 +82,9 @@ func NewFuncMap() []template.FuncMap {
"DateFmtShort": func(t time.Time) string {
return t.Format("Jan 02, 2006")
},
+ "SizeFmt": func(s int64) string {
+ return base.FileSize(s)
+ },
"List": List,
"SubStr": func(str string, start, length int) string {
if len(str) == 0 {