Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block interface {
// contains filtered or unexported methods
}
Block represents an element of the template.
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner is a tokenizer for got templates.
func NewScanner ¶
NewScanner initializes a new scanner with a given reader.
type SyntaxError ¶
func NewSyntaxError ¶
func NewSyntaxError(pos Pos, format string, args ...interface{}) *SyntaxError
func (*SyntaxError) Error ¶
func (e *SyntaxError) Error() string
type Template ¶
Template represents an entire got template. A template consists of zero or more blocks. Blocks can be either a TextBlock or a CodeBlock.
func Parse ¶
Parse parses a got template from a reader. The path specifies the path name used in the compiled template's pragmas.
Click to show internal directories.
Click to hide internal directories.