code

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultFuncsMap = template.FuncMap{
	"ToLower":      strings.ToLower,
	"ToUpper":      strings.ToUpper,
	"ToPascalCase": strcase.ToPascal,
	"ToCamelCase":  strcase.ToCamel,
	"ToSnakeCase":  strcase.ToSnake,
}

Functions

func LoadTemplate

func LoadTemplate(fs embed.FS, folder, name string) (*template.Template, error)

func RunParsers

func RunParsers(prog *ast.Program, fns ...func(prog *ast.Program) error) error

Types

type Generator

type Generator interface {
	Generate(outFilename string, prog *ast.Program) error
}

type GeneratorFunc

type GeneratorFunc func(outFilename string, prog *ast.Program) error

func (GeneratorFunc) Generate

func (f GeneratorFunc) Generate(outFilename string, prog *ast.Program) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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