Documentation
¶
Overview ¶
Package tpl provides a simple template registry and corresponding function for registering and loading templates from that registry.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAlreadyRegistered is returned when a template with a given // key has already been registered. ErrAlreadyRegistered = errors.New("template has already been registered") )
Functions ¶
func Get ¶
Get returns the template registered under the given key.
The template must be registered using Register first. If it hasn't been registered successfully before, Get will return an error. Use IsRegistered if you're unsure if the template exists.
func IsRegistered ¶
IsRegistered indicates whether a template with the given key has been registered successfully using Register.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.