Documentation ¶
Overview ¶
Package templates defines a uimage template configuration file parser.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTemplateNotExist = errors.New("config template does not exist")
ErrTemplateNotExist is returned when the given config name did not exist.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct { // Builder is bb, gbb, or binary. // // Defaults to bb if not given. Builder string // Commands are commands or template names. Commands []string }
Command represents commands to build.
type Config ¶
type Config struct { GOOS string GOARCH string BuildTags []string `yaml:"build_tags"` Commands []Command Files []string Init *string Uinit *string Shell *string }
Config is a mkuimage build configuration.
type Templates ¶
type Templates struct { Configs map[string]Config // Commands defines a set of command template name -> commands to expand. Commands map[string][]string }
Templates are a set of mkuimage build configs and command templates.
func Template ¶
Template parses the first file named .mkuimage.yaml in the current directory or any of its parents.
func TemplateFrom ¶
TemplateFrom parses a template from bytes.
func TemplateFromFile ¶
TemplateFromFile parses a template from the given file.
func (*Templates) CommandsFor ¶
CommandsFor expands commands according to command templates.
Click to show internal directories.
Click to hide internal directories.