Documentation
¶
Index ¶
- func Add(a any, b ...any) (r any, err error)
- func CSS(a any) (template.CSS, error)
- func Comma(n any, c ...string) (string, error)
- func Divide(a any, b ...any) (r any, err error)
- func HTML(a any) (template.HTML, error)
- func HTMLAttr(a any) (template.HTMLAttr, error)
- func HumanSize(n any) (string, error)
- func JS(a any) (template.JS, error)
- func JSON(a any) (template.JS, error)
- func JSStr(a any) (template.JSStr, error)
- func Multiply(a any, b ...any) (r any, err error)
- func Srcset(a any) (template.Srcset, error)
- func Subtract(a any, b ...any) (r any, err error)
- func URL(a any) (template.URL, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Comma ¶
Comma produces a string form of the given number in base 10 with commas after every three orders of magnitude.
e.g. Comma(834142) -> 834,142 e.g. Comma(834142, "_") -> 834_142
func HumanSize ¶
HumanSize returns a human-readable approximation of a size capped at 4 valid numbers (eg. "2.746 MB", "796 KB").
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.