Versions in this module Expand all Collapse all v0 v0.1.1 May 13, 2021 Changes in this version + var DefaultsFile string + var KnownTextNodeSubstitutions map[string]string + var ReplaceWithSnakeCase bool + func IsEmptyTree(n Node) bool + func Parse(name, text, leftDelim, rightDelim string, funcs ...map[string]interface{}) (map[string]*Tree, error) + func SubstituteSnakeCaseDefaultValue(field, snakeField string) + type ActionNode struct + Line int + Pipe *PipeNode + func (a *ActionNode) Copy() Node + func (a *ActionNode) String() string + type BoolNode struct + True bool + func (b *BoolNode) Copy() Node + func (b *BoolNode) String() string + type ChainNode struct + Field []string + Node Node + func (c *ChainNode) Add(field string) + func (c *ChainNode) Copy() Node + func (c *ChainNode) String() string + type CommandNode struct + Args []Node + IsFunc bool + PipeNodeCount int + func (c *CommandNode) Copy() Node + func (c *CommandNode) SetIsFunc() *CommandNode + func (c *CommandNode) String() string + type DotNode struct + func (d *DotNode) Copy() Node + func (d *DotNode) String() string + func (d *DotNode) Type() NodeType + type FieldNode struct + Ident []string + func (f *FieldNode) Copy() Node + func (f *FieldNode) String() string + type IdentifierNode struct + Ident string + IsFunc bool + func NewIdentifier(ident string) *IdentifierNode + func (i *IdentifierNode) Copy() Node + func (i *IdentifierNode) SetIsFunc() *IdentifierNode + func (i *IdentifierNode) SetPos(pos Pos) *IdentifierNode + func (i *IdentifierNode) SetTree(t *Tree) *IdentifierNode + func (i *IdentifierNode) String() string + type IfCommandNode struct + Args []Node + func (c *IfCommandNode) Copy() Node + func (c *IfCommandNode) String() string + type IfNode struct + ElseList *ListNode + Line int + List *ListNode + Pipe *IfPipeNode + func (n *IfNode) Copy() Node + func (n *IfNode) String() string + type IfPipeNode struct + Cmds []*IfCommandNode + Decl []*VariableNode + IsAssign bool + Line int + func (p *IfPipeNode) Copy() Node + func (p *IfPipeNode) CopyPipe() *IfPipeNode + func (p *IfPipeNode) String() string + type ListNode struct + Nodes []Node + func (l *ListNode) Copy() Node + func (l *ListNode) CopyList() *ListNode + func (l *ListNode) String() string + type NilNode struct + func (n *NilNode) Copy() Node + func (n *NilNode) String() string + func (n *NilNode) Type() NodeType + type Node interface + Copy func() Node + Position func() Pos + String func() string + Type func() NodeType + type NodeType int + const NodeAction + const NodeBool + const NodeChain + const NodeCommand + const NodeDot + const NodeField + const NodeIdentifier + const NodeIf + const NodeIfCommand + const NodeList + const NodeNil + const NodeNumber + const NodePipe + const NodePipeIf + const NodePipeRange + const NodePipeWith + const NodeRange + const NodeString + const NodeTemplate + const NodeText + const NodeVariable + const NodeWith + func (t NodeType) Type() NodeType + type NumberNode struct + Complex128 complex128 + Float64 float64 + Int64 int64 + IsComplex bool + IsFloat bool + IsInt bool + IsUint bool + Text string + Uint64 uint64 + func (n *NumberNode) Copy() Node + func (n *NumberNode) String() string + type PipeNode struct + Cmds []*CommandNode + Decl []*VariableNode + IsAssign bool + Line int + func (p *PipeNode) Copy() Node + func (p *PipeNode) CopyPipe() *PipeNode + func (p *PipeNode) String() string + type Pos int + func (p Pos) Position() Pos + type RangeNode struct + ElseList *ListNode + Line int + List *ListNode + Pipe *RangePipeNode + func (r *RangeNode) Copy() Node + func (r *RangeNode) GetRangeUseCaseType() RangeUseCaseType + func (r *RangeNode) RemoveVarPrefix(prefix string) + func (r *RangeNode) String() string + type RangePipeNode struct + Cmds []*CommandNode + Decl []*VariableNode + IsAssign bool + Line int + func (p *RangePipeNode) Copy() Node + func (p *RangePipeNode) CopyPipe() *RangePipeNode + func (p *RangePipeNode) String() string + type RangeUseCaseType int + const UseCaseDefault + const UseCaseKeyValue + const UseCaseNoVariables + const UseCaseSingleValue + const UseCaseTuple + type StringNode struct + Quoted string + Text string + func (s *StringNode) Copy() Node + func (s *StringNode) String() string + type TemplateNode struct + Line int + Name string + Pipe *PipeNode + func (t *TemplateNode) Copy() Node + func (t *TemplateNode) String() string + type TextNode struct + Text []byte + func (t *TextNode) Copy() Node + func (t *TextNode) String() string + type Tree struct + Name string + ParseName string + Root *ListNode + func New(name string, funcs ...map[string]interface{}) *Tree + func (t *Tree) Copy() *Tree + func (t *Tree) ErrorContext(n Node) (location, context string) + func (t *Tree) Parse(text, leftDelim, rightDelim string, treeSet map[string]*Tree, ...) (tree *Tree, err error) + type VariableNode struct + Ident []string + func (v *VariableNode) Copy() Node + func (v *VariableNode) String() string + type WithNode struct + ElseList *ListNode + Line int + List *ListNode + Pipe *WithPipeNode + func (w *WithNode) Copy() Node + func (w *WithNode) String() string + type WithPipeNode struct + Cmds []*CommandNode + Decl []*VariableNode + IsAssign bool + Line int + func (p *WithPipeNode) Copy() Node + func (p *WithPipeNode) CopyPipe() *WithPipeNode + func (p *WithPipeNode) String() string