Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTMLItem ¶
type HTMLItem struct { Text string // contains filtered or unexported fields }
HTMLItem is used to inject attributes and text into HTML templates.
func (HTMLItem) AddAttribute ¶
AddAttribute creates a key/value pair to represent and format HTML attributes into a string e.g. class="hidden pw-error" Setting a key twice overwrites it. Empty keys are ignored.
func (HTMLItem) Attributes ¶
Attributes returns a formatted string of attributes (set by AddAttribute)
type Templater ¶
type Templater struct {
// contains filtered or unexported fields
}
Templater ecapsulates the map to prevent direct access. See RenderTemplate
func (*Templater) Load ¶
Load loads or reloads template files from the filesystem. Here, baseGlob refers to base templates (usually a wrapper containing headers and such) and mainGlob refers to to the templates that are used to fill the base templates. Globs are of the standard Go format, i.e. templates/*.html