Versions in this module Expand all Collapse all v0 v0.40.0 Nov 6, 2026 Changes in this version + var ErrBuiltin = errors.New("mist: use the built-in filter") + var ErrInternal = fmt.Errorf("%w: internal error", ErrUnsupported) + var ErrUnchanged = errors.New("mist: leave the input unchanged") + var ErrUndefined = errors.New("mist: undefined variable") + var ErrUnsupported = errors.New("mist: unsupported") + func Append(dst []byte, tpl string, vars map[string]any, strict bool) ([]byte, error) + func Check(tpl string) error + func Location(name string) (*time.Location, bool) + func Render(tpl string, vars map[string]any, strict bool) (string, error) + type Comparer interface + Compare func(op string, other any) (bool, error) + type Constructs uint32 + const BlankKeyword + const EmptyKeyword + const NegativeLiterals + const RawBlocks + const TrimMarkers + const UnspacedOperators + type Dialect struct + Compare func(op string, a, b any) (bool, error) + Contains func(a, b any) (bool, error) + NoBuiltinFilters bool + NoDefaultLeniency bool + NumberText bool + Output func(dst []byte, v any) ([]byte, error) + Reject Constructs + RubyLookups bool + StrictAssign bool + type Engine struct + Dialect *Dialect + Filters map[string]FilterFunc + Limits Limits + Now func() time.Time + PassUnknownFilters bool + Tags map[string]TagFunc + func (e Engine) Append(dst []byte, tpl string, vars map[string]any, strict bool) (out []byte, err error) + func (e Engine) Check(tpl string) (err error) + func (e Engine) Render(tpl string, vars map[string]any, strict bool) (string, error) + func (e Engine) RenderChain(steps []Step, vars map[string]any) (res []Result, n int, hydrated map[string]any) + type Error struct + Code string + Col int + Kind error + Line int + Msg string + Path []string + Pos int + Stack []byte + func (e *Error) Error() string + func (e *Error) Unwrap() error + type Filter struct + Args []any + Input any + Name string + Now func() time.Time + Strict bool + func (f Filter) ArgUndefined(i int) bool + func (f Filter) InputUndefined() bool + type FilterFunc func(f Filter) (any, error) + type Keyword string + const Blank + const Empty + type Limits struct + Iterations int + Memory int + Output int + type Result struct + Err error + Out string + func RenderChain(steps []Step, vars map[string]any) (res []Result, n int, hydrated map[string]any) + type Step struct + Body string + Key []string + Strict bool + Vars map[string]any + type Tag struct + Args string + Depth int + Name string + Source string + Strict bool + Vars map[string]any + func (t Tag) Lookup(path string) (v any, ok bool) + func (t Tag) Render(dst []byte, src string) (out []byte, err error) + type TagFunc func(dst []byte, t Tag) ([]byte, error) + type Undefined struct