Documentation
¶
Index ¶
Constants ¶
View Source
const (
Version = 3
)
Variables ¶
This section is empty.
Functions ¶
func EvalEnvSlice ¶ added in v1.2.0
EvalEnvSlice evaluates a single env scope on top of parentEnv. Each entry's ${VAR} references are expanded against earlier entries in the same scope first, then against parentEnv. The returned map contains all parentEnv keys plus the scope's overrides/additions.
Types ¶
type Command ¶
type Command struct {
Alias []string `yaml:"alias"`
Help string `yaml:"help"`
Args []string `yaml:"args"`
Env yaml.MapSlice `yaml:"env"` // Scoped to this command and its descendants.
Options map[string]interface{} `yaml:"options"` // Scoped to this command and its descendants.
Import []string `yaml:"import"` // Sourced before exec for this command and its descendants.
Deps []string `yaml:"deps"`
Exec string `yaml:"exec"`
Include string `yaml:"include"`
Commands Commands `yaml:"commands"`
}
type Manifest ¶
type Manifest struct {
Version int `yaml:"version"`
Project string `yaml:"project"`
Env yaml.MapSlice `yaml:"env"` // Use MapSlice to preserve order.
Options map[string]interface{} `yaml:"options"`
Interpreter string `yaml:"interpreter"`
Import []string `yaml:"import"`
Commands Commands `yaml:"commands"`
}
func (*Manifest) ParseOptions ¶
ParseOptions returns a per-scope option map. The empty key holds the root manifest's options (visible everywhere); other keys are command paths that declared their own 'options:' block. Each scope's option names are independent — two subgrmls can both have a 'debug' option.
Click to show internal directories.
Click to hide internal directories.