generator

package
v0.0.0-...-6d0822f Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Generates go code that defines a component described by a vit file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(src io.Reader, srcPath vpath.Path, packageName string, dst io.Writer) error

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

func GenerateFromDocument(doc *parse.VitDocument, packageName string, dst io.Writer) error

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

func GenerateFromFile(srcFile vpath.Path, packageName string, dst io.Writer) error

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.

func GenerateFromFileAndSave

func GenerateFromFileAndSave(srcPath vpath.Path, packageName string, dstPath string) error

GenerateFromFileAndSave takes the path to a vit file and generates a go file at the destination path. The package name defines to which package the go file should belong.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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