Versions in this module Expand all Collapse all v6 v6.2.0 Dec 16, 2022 v6.1.1 Dec 16, 2022 v6.1.0 Mar 5, 2021 Changes in this version type VarMap + func (scope VarMap) SortedKeys() []string v6.0.2 Jan 4, 2021 v6.0.1 Nov 6, 2020 v6.0.0 Nov 5, 2020 Changes in this version + func IsEmptyTree(n Node) bool + type ActionNode struct + Pipe *PipeNode + Set *SetNode + func (a *ActionNode) String() string + type AdditiveExprNode struct + func (node *AdditiveExprNode) String() string + type Arguments struct + func (a *Arguments) Get(argumentIndex int) reflect.Value + func (a *Arguments) IsSet(argumentIndex int) bool + func (a *Arguments) NumOfArguments() int + func (a *Arguments) Panicf(format string, v ...interface{}) + func (a *Arguments) ParseInto(ptrs ...interface{}) error + func (a *Arguments) RequireNumOfArguments(funcname string, min, max int) + func (a *Arguments) Runtime() *Runtime + type BlockNode struct + Content *ListNode + Expression Expression + List *ListNode + Name string + Parameters *BlockParameterList + func (t *BlockNode) String() string + type BlockParameter struct + Expression Expression + Identifier string + type BlockParameterList struct + List []BlockParameter + func (bplist *BlockParameterList) Param(name string) (Expression, int) + func (bplist *BlockParameterList) String() (str string) + type BoolNode struct + True bool + func (b *BoolNode) String() string + type BranchNode struct + ElseList *ListNode + Expression Expression + List *ListNode + Set *SetNode + func (b *BranchNode) String() string + type Cache interface + Get func(templatePath string) *Template + Put func(templatePath string, t *Template) + type CallArgs struct + Exprs []Expression + HasPipeSlot bool + type CallExprNode struct + BaseExpr Expression + func (s *CallExprNode) String() string + type ChainNode struct + Field []string + Node Node + func (c *ChainNode) Add(field string) + func (c *ChainNode) String() string + type CommandNode struct + func (c *CommandNode) String() string + type ComparativeExprNode struct + func (node *ComparativeExprNode) String() string + type Expression interface + type FieldNode struct + Ident []string + func (f *FieldNode) String() string + type Func func(Arguments) reflect.Value + type IdentifierNode struct + Ident string + func (i *IdentifierNode) String() string + type IfNode struct + type InMemLoader struct + func NewInMemLoader() *InMemLoader + func (l *InMemLoader) Delete(templatePath string) + func (l *InMemLoader) Exists(templatePath string) bool + func (l *InMemLoader) Open(templatePath string) (io.ReadCloser, error) + func (l *InMemLoader) Set(templatePath, contents string) + type IncludeNode struct + Context Expression + Name Expression + func (t *IncludeNode) String() string + type IndexExprNode struct + Base Expression + Index Expression + func (s *IndexExprNode) String() string + type ListNode struct + Nodes []Node + func (l *ListNode) String() string + type Loader interface + Exists func(templatePath string) bool + Open func(templatePath string) (io.ReadCloser, error) + type LogicalExprNode struct + func (node *LogicalExprNode) String() string + type MultiplicativeExprNode struct + func (node *MultiplicativeExprNode) String() string + type NilNode struct + func (n *NilNode) String() string + type Node interface + Position func() Pos + String func() string + Type func() NodeType + type NodeBase struct + Line int + TemplatePath string + type NodeType int + const NodeAction + const NodeAdditiveExpr + const NodeBlock + const NodeBool + const NodeCallExpr + const NodeChain + const NodeCommand + const NodeComparativeExpr + const NodeField + const NodeIdentifier + const NodeIf + const NodeInclude + const NodeIndexExpr + const NodeList + const NodeLogicalExpr + const NodeMultiplicativeExpr + const NodeNil + const NodeNotExpr + const NodeNumber + const NodeNumericComparativeExpr + const NodePipe + const NodeRange + const NodeReturn + const NodeSet + const NodeSliceExpr + const NodeString + const NodeTernaryExpr + const NodeText + const NodeTry + const NodeUnderscore + const NodeYield + func (t NodeType) Type() NodeType + type NotExprNode struct + Expr Expression + func (s *NotExprNode) String() string + type NumberNode struct + Complex128 complex128 + Float64 float64 + Int64 int64 + IsComplex bool + IsFloat bool + IsInt bool + IsUint bool + Text string + Uint64 uint64 + func (n *NumberNode) String() string + type NumericComparativeExprNode struct + func (node *NumericComparativeExprNode) String() string + type OSFileSystemLoader struct + func NewOSFileSystemLoader(dirPath string) *OSFileSystemLoader + func (l *OSFileSystemLoader) Exists(templatePath string) bool + func (l *OSFileSystemLoader) Open(templatePath string) (io.ReadCloser, error) + type Option func(*Set) + func InDevelopmentMode() Option + func WithCache(c Cache) Option + func WithDelims(left, right string) Option + func WithSafeWriter(w SafeWriter) Option + func WithTemplateNameExtensions(extensions []string) Option + type PipeNode struct + Cmds []*CommandNode + func (p *PipeNode) String() string + type Pos int + func (p Pos) Position() Pos + type RangeNode struct + type Ranger interface + ProvidesIndex func() bool + Range func() (reflect.Value, reflect.Value, bool) + type Renderer interface + Render func(*Runtime) + type RendererFunc func(*Runtime) + func (renderer RendererFunc) Render(r *Runtime) + type ReturnNode struct + Value Expression + func (n *ReturnNode) String() string + type Runtime struct + func (r *Runtime) Context() reflect.Value + func (st *Runtime) YieldBlock(name string, context interface{}) + func (state *Runtime) Let(name string, val interface{}) + func (state *Runtime) LetGlobal(name string, val interface{}) + func (state *Runtime) MustResolve(name string) reflect.Value + func (state *Runtime) Resolve(name string) reflect.Value + func (state *Runtime) Set(name string, val interface{}) error + func (state *Runtime) SetOrLet(name string, val interface{}) + func (w Runtime) Write(b []byte) (int, error) + type SafeWriter func(io.Writer, []byte) + type Set struct + func NewSet(loader Loader, opts ...Option) *Set + func (s *Set) AddGlobal(key string, i interface{}) *Set + func (s *Set) AddGlobalFunc(key string, fn Func) *Set + func (s *Set) GetTemplate(templatePath string) (t *Template, err error) + func (s *Set) LookupGlobal(key string) (val interface{}, found bool) + func (s *Set) Parse(templatePath, contents string) (template *Template, err error) + type SetNode struct + IndexExprGetLookup bool + Left []Expression + Let bool + Right []Expression + func (set *SetNode) String() string + type SliceExprNode struct + Base Expression + EndIndex Expression + Index Expression + func (s *SliceExprNode) String() string + type StringNode struct + Quoted string + Text string + func (s *StringNode) String() string + type Template struct + Name string + ParseName string + Root *ListNode + func (t *Template) Execute(w io.Writer, variables VarMap, data interface{}) (err error) + func (t *Template) String() (template string) + type TernaryExprNode struct + Boolean Expression + Left Expression + Right Expression + func (s *TernaryExprNode) String() string + type TextNode struct + Text []byte + func (t *TextNode) String() string + type TryNode struct + Catch *catchNode + List *ListNode + func (n *TryNode) String() string + type UnderscoreNode struct + func (i *UnderscoreNode) String() string + type VarMap map[string]reflect.Value + func (scope VarMap) Set(name string, v interface{}) VarMap + func (scope VarMap) SetFunc(name string, v Func) VarMap + func (scope VarMap) SetWriter(name string, v SafeWriter) VarMap + type YieldNode struct + Content *ListNode + Expression Expression + IsContent bool + Name string + Parameters *BlockParameterList + func (t *YieldNode) String() string Other modules containing this package github.com/CloudyKit/jet github.com/CloudyKit/jet/v3 github.com/CloudyKit/jet/v4 github.com/CloudyKit/jet/v5