Documentation
¶
Index ¶
- func AddNums[T float32 | int | int32 | float64 | int64 | uint64 | uint32 | uint](values ...T) (out T)
- func DefaultFuncMap() template.FuncMap
- func ExpandAttrs(attrs map[string]any) template.JS
- func FloatDiv[A Number, B Number](a A, b B) (out float64)
- func IntDiv[A Number, B Number](a A, b B) (out int64)
- func MultNums[T float32 | int | int32 | float64 | int64 | uint64 | uint32 | uint](values ...T) (out T)
- func NumList[T float32 | int | int32 | float64 | int64 | uint64 | uint32 | uint](start, end, incr int) (out []T)
- func SliceArray(values any, offset, count any) any
- func Slugify(input string) string
- func SubNums[T float32 | int | int32 | float64 | int64 | uint64 | uint32 | uint](a, b T) (out T)
- func TimeSinceString(t time.Time) string
- func ToFloat(v any) float64
- func ToInt(v any) int
- func ToString(v any) string
- func ValuesToDict(values ...any) (map[string]any, error)
- type Number
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultFuncMap ¶
func SliceArray ¶
func TimeSinceString ¶
Given a time, returns a "x y ago" string where y is one of "years, months, weeks, days, hours, minutes, seconds"
Types ¶
Click to show internal directories.
Click to hide internal directories.