|
|
@ -60,14 +60,15 @@ func NewFuncMap() []template.FuncMap { |
|
|
|
"LoadTimes": func(startTime time.Time) string { |
|
|
|
"LoadTimes": func(startTime time.Time) string { |
|
|
|
return fmt.Sprint(time.Since(startTime).Nanoseconds()/1e6) + "ms" |
|
|
|
return fmt.Sprint(time.Since(startTime).Nanoseconds()/1e6) + "ms" |
|
|
|
}, |
|
|
|
}, |
|
|
|
"AvatarLink": tool.AvatarLink, |
|
|
|
"AvatarLink": tool.AvatarLink, |
|
|
|
"Safe": Safe, |
|
|
|
"AppendAvatarSize": tool.AppendAvatarSize, |
|
|
|
"Sanitize": bluemonday.UGCPolicy().Sanitize, |
|
|
|
"Safe": Safe, |
|
|
|
"Str2html": Str2html, |
|
|
|
"Sanitize": bluemonday.UGCPolicy().Sanitize, |
|
|
|
"TimeSince": tool.TimeSince, |
|
|
|
"Str2html": Str2html, |
|
|
|
"RawTimeSince": tool.RawTimeSince, |
|
|
|
"TimeSince": tool.TimeSince, |
|
|
|
"FileSize": tool.FileSize, |
|
|
|
"RawTimeSince": tool.RawTimeSince, |
|
|
|
"Subtract": tool.Subtract, |
|
|
|
"FileSize": tool.FileSize, |
|
|
|
|
|
|
|
"Subtract": tool.Subtract, |
|
|
|
"Add": func(a, b int) int { |
|
|
|
"Add": func(a, b int) int { |
|
|
|
return a + b |
|
|
|
return a + b |
|
|
|
}, |
|
|
|
}, |
|
|
|