Documentation ¶
Overview ¶
liquid template parser
Index ¶
- Variables
- func Configure() *core.Configuration
- func SetInternalBuffer(count, size int)
- type Literal
- type Output
- type SimpleCache
- type TagFactory
- type Template
- func (t *Template) AddCode(code core.Code)
- func (t *Template) AddSibling(tag core.Tag) error
- func (t *Template) Execute(writer io.Writer, data map[string]interface{}) core.ExecuteState
- func (t *Template) LastSibling() core.Tag
- func (t *Template) Name() string
- func (t *Template) Render(writer io.Writer, data map[string]interface{})
- func (t *Template) Type() core.TagType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //A Configuration with caching disabled NoCache = Configure().Cache(nil) )
View Source
var Tags = map[string]TagFactory{ "comment": tags.CommentFactory, "endcomment": tags.EndCommentFactory, "raw": tags.RawFactory, "endraw": tags.EndRawFactory, "assign": tags.AssignFactory, "capture": tags.CaptureFactory, "endcapture": tags.EndCaptureFactory, "if": tags.IfFactory, "elseif": tags.ElseIfFactory, "else": tags.ElseFactory, "endif": tags.EndIfFactory, "unless": tags.UnlessFactory, "endunless": tags.EndUnlessFactory, "case": tags.CaseFactory, "when": tags.WhenFactory, "endcase": tags.EndCaseFactory, "include": tags.IncludeFactory, "for": tags.ForFactory, "endfor": tags.EndForFactory, "break": tags.BreakFactory, "continue": tags.ContinueFactory, }
View Source
var TemplateCache = &SimpleCache{lookup: make(map[string]core.Code)}
Functions ¶
func SetInternalBuffer ¶
func SetInternalBuffer(count, size int)
Set's the count and size of the internal bytepool
Types ¶
type SimpleCache ¶
func (*SimpleCache) Clear ¶
func (c *SimpleCache) Clear()
type TagFactory ¶
type Template ¶
A compiled liquid template
func Parse ¶
func Parse(data []byte, config *core.Configuration) (*Template, error)
Parse the bytes into a Liquid template
func ParseFile ¶
func ParseFile(path string, config *core.Configuration) (*Template, error)
Turn the contents of the specified file into a liquid template
func ParseString ¶
func ParseString(data string, config *core.Configuration) (*Template, error)
Parse the string into a liquid template
func (*Template) LastSibling ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.