Documentation
¶
Index ¶
- Variables
- func AddDays(t time.Time, days int) time.Time
- func DayEnd(t time.Time) time.Time
- func DayStart(t time.Time) time.Time
- func FmtDate(t time.Time) string
- func FmtHuman(t time.Time) string
- func FmtTime(t time.Time) string
- func Lib(fms ...FuncMap) (res lib.Specs, err error)
- func Like(txt, term string, ignCase bool) bool
- func MustLib(fms ...FuncMap) lib.Specs
- type FuncMap
Constants ¶
This section is empty.
Variables ¶
View Source
var Std = exp.Builtins(make(lib.Specs).AddMap(lib.Std).AddMap(MustLib( Str, Time, UUID, )))
View Source
var Str = FuncMap{ "index": strings.Index, "prefix": strings.HasPrefix, "suffix": strings.HasSuffix, "contains": strings.Contains, "upper": strings.ToUpper, "lower": strings.ToLower, "trim": strings.TrimSpace, "like": func(t, p string) bool { return Like(t, p, false) }, "ilike": func(t, p string) bool { return Like(t, p, true) }, }
View Source
var Time = FuncMap{ "add_span": time.Time.Add, "add_days": AddDays, "add_date": time.Time.AddDate, "sub_time": time.Time.Sub, "year": time.Time.Year, "month": time.Time.Month, "weekday": time.Time.Weekday, "yearday": time.Time.YearDay, "day_start": DayStart, "day_end": DayEnd, "time_format": time.Time.Format, "fmt_date": FmtDate, "fmt_time": FmtTime, "fmt_human": FmtTime, }
View Source
var UUID = FuncMap{ "new_uuid": cor.NewUUID, }
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.