Documentation ¶
Overview ¶
Package utils provides utility fns for maru
Package utils provides utility fns for maru
Index ¶
- func FormatEnvVar(name, value string) string
- func MergeEnv(env1, env2 []string) []string
- func PopulateTemplateMap(zarfVariables []zarfTypes.ZarfPackageVariable, setVariables map[string]string) map[string]*TextTemplate
- func TemplateString(templateMap map[string]*TextTemplate, s string) string
- func TemplateTaskActionsWithInputs(task types.Task, withs map[string]string) ([]types.Action, error)
- func UseLogFile() error
- type TextTemplate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatEnvVar ¶ added in v0.0.2
FormatEnvVar format environment variables replacing non-alphanumeric characters with underscores and adding INPUT_ prefix
func MergeEnv ¶ added in v0.0.2
MergeEnv merges two environment variable arrays, replacing variables found in env2 with variables from env1 otherwise appending the variable from env1 to env2
func PopulateTemplateMap ¶ added in v0.0.2
func PopulateTemplateMap(zarfVariables []zarfTypes.ZarfPackageVariable, setVariables map[string]string) map[string]*TextTemplate
PopulateTemplateMap creates a template variable map
func TemplateString ¶ added in v0.0.2
func TemplateString(templateMap map[string]*TextTemplate, s string) string
TemplateString replaces ${...} with the value from the template map
Types ¶
type TextTemplate ¶ added in v0.1.0
type TextTemplate struct { Sensitive bool AutoIndent bool Type zarfTypes.VariableType Value string }
TextTemplate represents a value to be templated into a text file. todo: should be grabbing from Zarf but it's now private: https://github.com/defenseunicorns/zarf/issues/2395