Documentation ¶
Overview ¶
Most of the code in this package taken from golang/text/template/parse
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Relaxed = &Restrictions{false, false, false} NoEmpty = &Restrictions{false, true, false} NoUnset = &Restrictions{true, false, false} Strict = &Restrictions{true, true, false} )
Restrictions specifier
Functions ¶
This section is empty.
Types ¶
type Mode ¶ added in v1.2.0
type Mode int
A mode value is a set of flags (or 0). They control parser behavior.
type Parser ¶
type Parser struct { Name string // name of the processing template Env Env Restrict *Restrictions Mode Mode // contains filtered or unexported fields }
Parser type initializer
type Pos ¶
type Pos int
Pos represents a byte position in the original input text from which this template was parsed.
type Restrictions ¶
The restrictions option controls the parsring restriction.
type SubstitutionNode ¶
type SubstitutionNode struct { NodeType ExpType itemType Variable *VariableNode Default Node // Default could be variable or text }
func (*SubstitutionNode) String ¶
func (t *SubstitutionNode) String() (string, error)
type VariableNode ¶
type VariableNode struct { NodeType Ident string Env Env Restrict *Restrictions }
func NewVariable ¶
func NewVariable(ident string, env Env, restrict *Restrictions) *VariableNode
func (*VariableNode) String ¶
func (t *VariableNode) String() (string, error)
Click to show internal directories.
Click to hide internal directories.