Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustRenderOnce ¶
MustRenderOnce performs a RenderOnce and will exit the program when an error occurs.
func Register ¶
Register will compile and register a template using the string given and store the compiled template in the map.
func RegisterFile ¶
RegisterFile will compile and register a template using the contents of a file and storing by name in the compiled map.
func RenderOnce ¶
RenderOnce bypasses storing the saved templates. Tihs should only be used if the template is only ever going to be compiled and rendered _one time_.
func Unregister ¶
func Unregister(name string)
Unregister removes a previously compiled template, normally only used for testing purposes but in cases a template is, for some reason, miscompiled (although longer term solutions should be much more preferred than unregistering)
Types ¶
type InvalidDataError ¶
type InvalidDataError string
InvalidDataError represents that a data value was provided of an unexpected type.
func (InvalidDataError) Error ¶
func (i InvalidDataError) Error() string
Error returns an error message that represents the type of data that was received and what is expected.