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 NoEmpty = &Restrictions{false, true}
View Source
var NoUnset = &Restrictions{true, false}
View Source
var Relaxed = &Restrictions{false, false}
View Source
var Strict = &Restrictions{true, true}
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct {
Name string // name of the processing template
Env Env
Restrict *Restrictions
// contains filtered or unexported fields
}
type Pos ¶
type Pos int
Pos represents a byte position in the original input text from which this template was parsed.
type Restrictions ¶
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.