Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { Templates []string DataFile string OutputFile string HTMLFuncMap temple.FuncMap TextFuncMap temple.FuncMap HTML bool Watch bool // contains filtered or unexported fields }
App represents the temple application. To populate the struct with values from the command line as described in the documentation, instantiate the struct with the New() function.
func New ¶
func New() *App
New creates a new App. The default values are populated with values from the command line. The list of command line args will be used as the list of template files. At least one must be provided. The available command line flags are:
-o string: The output filename -d string: The data file -w: Indicates that the input files should be watched for changes -v: Indicates that additional logging should be displayed -html: Indicates that the html/template parser should be used
func (*App) ClearFuncMaps ¶
ClearFuncMaps resets both the text and HTML FuncMaps for the App.
func (*App) ClearHTMLFuncMap ¶
ClearHTMLFuncMap resets the App's HTML FuncMap.
func (*App) ClearTextFuncMap ¶
ClearTextFuncMap resets the App's text FuncMap.
func (*App) Run ¶
Run runs the temple application. If App.Watch is set to true, then this method will never return.
func (*App) WithFuncMap ¶
WithFuncMap merges the provided FuncMap into the App's text and HTML FuncMaps. This method can be called multiple times to merge in multiple FuncMaps.
func (*App) WithHTMLFuncMap ¶
WithHTMLFuncMap merges the provided FuncMap into the App's HTML FuncMap. This method can me called multipled times to merge in multiple FuncMaps.