Documentation ¶
Overview ¶
Generates go code that defines a component described by a vit file.
Index ¶
- func Generate(src io.Reader, srcPath vpath.Path, packageName string, dst io.Writer) error
- func GenerateFromDocument(doc *parse.VitDocument, packageName string, dst io.Writer) error
- func GenerateFromFile(srcFile vpath.Path, packageName string, dst io.Writer) error
- func GenerateFromFileAndSave(srcPath vpath.Path, packageName string, dstPath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
Generate takes a reader for a vit file and outputs generated go code into the destination writer. It uses the source path to extract the component name and to provide useful error messages. The package name defines to which package the go file should belong.
func GenerateFromDocument ¶
GenerateFromDocument takes a vit document and outputs generated go code into the destination writer. The package name defines to which package the go file should belong.
func GenerateFromFile ¶
GenerateFromFile takes the path of a vit file and outputs generated go code into the destination writer. The package name defines to which package the go file should belong.
Types ¶
This section is empty.