Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompileToFile ¶
CompileToFile compiles to file according to given CLI flags output: output file name
func FormatFile ¶
FormatFile formats a generated file with go formatter
Types ¶
type Compiler ¶
Compiler takes a CLI context, decode it and compile to the io writer
func NewCompiler ¶
func NewCompiler(dec DecoderFunc, enc EncoderFunc) Compiler
NewCompiler takes decoder and encoder and use them in file compilation
type Context ¶
type Context map[string]interface{}
Context for template compilation
type DecoderFunc ¶
DecoderFunc decode a given CLI context into a compile context
type EncoderFunc ¶
EncoderFunc compiles a given comiple context and output result to the io.Writer
type GourdError ¶
GourdError is interface
func Error ¶
func Error(msg string, v ...interface{}) GourdError
Error returns a GourdError with "fail" return code
func Exit ¶
func Exit(msg string, v ...interface{}) GourdError
Exit returns a GourdError with "success" return code
Click to show internal directories.
Click to hide internal directories.