generator

package
v0.0.0-...-96111de Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Appender

type Appender struct {
	FilePath     string
	TemplateName string
	Data         *parser.Data
	Writer       iohelper.Writer
	Reader       iohelper.Reader
}

Appender renders a template and appends to an existing file.

func (*Appender) Do

func (a *Appender) Do() error

Do appends content to the given file given a template.

type Generator

type Generator struct {
	FilePath               string
	TemplateName           string
	Data                   *parser.Data
	Writer                 iohelper.Writer
	WithAutogeneratedNotes bool
}

Generator renders a template to a output.

func (*Generator) Do

func (g *Generator) Do() error

Do generates a file given a template. Then, it uses writer to render output.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL