Documentation ¶
Index ¶
- Variables
- func Add(a, b interface{}) (interface{}, error)
- func Args(args ...interface{}) map[string]interface{}
- func Divide(a, b interface{}) (interface{}, error)
- func FormatDecimal(s string, n int) string
- func Humanize(s string) string
- func Humanize1024(s string) string
- func HumanizeDuration(s string) string
- func HumanizeDurationFloat64(v float64) string
- func HumanizeDurationInterface(i interface{}) string
- func HumanizePercentage(s string) string
- func HumanizePercentageH(s string) string
- func Multiply(a, b interface{}) (interface{}, error)
- func Now() time.Time
- func ReReplaceAll(pattern, repl, text string) string
- func Subtract(a, b interface{}) (interface{}, error)
- func Timeformat(ts int64, pattern ...string) string
- func Timestamp(pattern ...string) string
- func ToFloat64(val interface{}) (float64, error)
- func ToString(v interface{}) string
- func Unescaped(str string) interface{}
- func Urlconvert(str string) interface{}
Constants ¶
This section is empty.
Variables ¶
View Source
var TemplateFuncMap = template.FuncMap{ "escape": url.PathEscape, "unescaped": Unescaped, "urlconvert": Urlconvert, "timeformat": Timeformat, "timestamp": Timestamp, "args": Args, "reReplaceAll": ReReplaceAll, "match": regexp.MatchString, "toUpper": strings.ToUpper, "toLower": strings.ToLower, "contains": strings.Contains, "humanize": Humanize, "humanize1024": Humanize1024, "humanizeDuration": HumanizeDuration, "humanizeDurationInterface": HumanizeDurationInterface, "humanizePercentage": HumanizePercentage, "humanizePercentageH": HumanizePercentageH, "add": Add, "sub": Subtract, "mul": Multiply, "div": Divide, "now": Now, "toString": ToString, "formatDecimal": FormatDecimal, }
Functions ¶
func Divide ¶
func Divide(a, b interface{}) (interface{}, error)
Divide returns the division of b from a.
func FormatDecimal ¶ added in v6.0.2
func Humanize1024 ¶
func HumanizeDuration ¶
func HumanizeDurationFloat64 ¶
func HumanizeDurationInterface ¶
func HumanizeDurationInterface(i interface{}) string
func HumanizePercentage ¶
func HumanizePercentageH ¶
func Multiply ¶
func Multiply(a, b interface{}) (interface{}, error)
Multiply returns the product of a and b.
func ReReplaceAll ¶
func Subtract ¶
func Subtract(a, b interface{}) (interface{}, error)
Subtract returns the difference of b from a.
func Timeformat ¶
func Urlconvert ¶
func Urlconvert(str string) interface{}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.