Documentation ¶
Index ¶
- Variables
- func FromYAML(str string) map[string]any
- func HasKeyAny(m map[any]any, key any) bool
- func ToYAML(v any) string
- type ActionNode
- type Config
- type FieldNode
- type FieldsSetter
- type FuncMap
- type Generator
- func (g *Generator) GetMissingKeys(tpl *template.Template) []string
- func (g *Generator) ProcessFile(tpl *template.Template) (bytes.Buffer, error)
- func (g *Generator) ProcessFilename(tm *Model) (string, error)
- func (g *Generator) ProcessTemplate() (*template.Template, error)
- func (g *Generator) UpdateTarget(newTarget string)
- func (*Generator) WriteMissingKeysToFile(missingKeys []string, tmplPath, outputPath string) error
- type IfNode
- type ListNode
- type Model
- type Node
- type PipeNode
- type RangeNode
- type Templates
- type TplNode
- type VariableNode
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type ActionNode ¶
type ActionNode parse.ActionNode
func (*ActionNode) Set ¶
func (a *ActionNode) Set(n *Node)
type Config ¶
type FieldsSetter ¶
type FieldsSetter interface {
Set(n *Node)
}
type FuncMap ¶
func NewFuncMap ¶
func NewFuncMap() FuncMap
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
func (*Generator) GetMissingKeys ¶
func (*Generator) ProcessFile ¶
func (*Generator) ProcessFilename ¶
func (*Generator) ProcessTemplate ¶
func (*Generator) UpdateTarget ¶
type Model ¶
type Model struct { SourcePath string TargetPath string ConfigPath string OutputPath string Config Config Suffix string Context map[string]map[any]any FuncMap FuncMap StopIfTargetNotEmpty bool DryRun bool }
func NewTemplateModel ¶
type VariableNode ¶
type VariableNode parse.VariableNode
func (*VariableNode) Set ¶
func (*VariableNode) Set(_ *Node)
Set Skips VariableNodes because they are not fields.
Click to show internal directories.
Click to hide internal directories.