gen

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FuncsPkgPath = "github.com/apleshkov/tmtr/funcs"
)
View Source
const Version = "0.2.0"

Variables

This section is empty.

Functions

func GenerateFromFile

func GenerateFromFile(opts GeneratorOptions) (*ast.File, error)

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

type GeneratorOptions

type GeneratorOptions struct {
	InFile, OutFile string
	Mode            Mode
	Package         string
	FnName          string
	DataType        string
	Tmpls           []NamedTemplateInfo
	Imports         []string
	Funcs           []string
}

type Mode

type Mode int
const (
	ModeText Mode = iota
	ModeHTML
)

type NamedTemplateInfo

type NamedTemplateInfo struct {
	Name, DataType string
}

Jump to

Keyboard shortcuts

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