Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTemplateDirectory ¶
Types ¶
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Container represents a set of templates that can be render
func NewFromTemplate ¶
NewFromTemplates creates a new templates container using a `template.Template` object
func NewWithWatcher ¶
NewWithWatcher creates a new templates container scanning a directory and watch the directory filesystem changes to apply them to the loaded templates. This function returns the container and an errors channel to pass all errors that can happen during the watch process, or an regular error if we fail to create the templates or the watcher. The caller must consume the returned errors channel to ensure not blocking the watch process.
func (*Container) Close ¶
func (c *Container) Close()
Close stops the templates watcher of the container in case you have created it with watch parameter set to true