Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTemplateContent ¶
func ToLowerAndGo ¶
func WriteTemplateFile ¶
Types ¶
type Options ¶
type Options struct { // PackageName is a helper that specifies the package header declaration. // In other words, when you write the template you don't need to specify `package X` // at the top of the file. By providing PackageName in the Options, the Render // function will do that for you. PackageName string // Template is a string of the entire template that // will be parsed and rendered. If it's empty, // the plugin processor will look for .gotpl files // in the same directory of where you wrote the plugin. Template string // UserDefinedFunctions is used to rewrite in the the file so we can use custom functions // The struct is still available for use in private but will be rewritten to // a private function with original in front of it UserDefinedFunctions []string // Data will be passed to the template execution. Data interface{} }
Click to show internal directories.
Click to hide internal directories.