Documentation
¶
Overview ¶
Package template provides template configuration and parsing utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Name string `toml:"name" json:"name"`
Description string `toml:"description" json:"description"`
Version string `toml:"version" json:"version"`
Author string `toml:"author" json:"author"`
Engine string `toml:"engine" json:"engine"`
Variables []Variable `toml:"variables" json:"variables"`
}
Config represents the template configuration
func LoadConfig ¶
LoadConfig loads template configuration from a file
type Variable ¶
type Variable struct {
Name string `toml:"name" json:"name"`
Type string `toml:"type" json:"type"`
Prompt string `toml:"prompt" json:"prompt"`
Default interface{} `toml:"default,omitempty" json:"default,omitempty"`
Required bool `toml:"required,omitempty" json:"required,omitempty"`
Choices []string `toml:"choices,omitempty" json:"choices,omitempty"`
}
Variable represents a template variable
Click to show internal directories.
Click to hide internal directories.