Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GoWriter ¶
type GoWriter struct {
*TextWriter
}
GoWriter formats and writes go code It overrides Compile and Write functions of TextWriter
func NewGoWriter ¶
NewGoWriter is the constructor for GoWriter
type IWriter ¶
type IWriter interface { Compile(context.Context, string, interface{}) error Format(context.Context) error Write(context.Context) error }
IWriter implements a code writer
type TextWriter ¶
type TextWriter struct {
// contains filtered or unexported fields
}
TextWriter writes any text files
func NewTextWriter ¶
func NewTextWriter(path, filename, header string) *TextWriter
NewTextWriter returns an instance of TextWriter
func (*TextWriter) Compile ¶
func (w *TextWriter) Compile(ctx context.Context, tmpl string, data interface{}) error
Compile should compile the template and get the code as bytes
Click to show internal directories.
Click to hide internal directories.