Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
Template formats a message using a predefined format string.
func NewTemplate ¶
func NewTemplate(format string, opts ...TemplateOpt) (*Template, error)
NewMustache creates a new instance of Template.
type TemplateOpt ¶
type TemplateOpt func(m *Template)
TemplateOpt represents an option for the constructor.
func WithQuotes ¶
func WithQuotes(openQuote, closeQuote rune) TemplateOpt
WithQuotes sets custom quote chars.
func WithTags ¶
func WithTags(openTag, closeTag rune) TemplateOpt
WithTags sets custom open and close tags. To disable set to 0.
Click to show internal directories.
Click to hide internal directories.