Documentation ¶
Overview ¶
Package utils provides utility fns for maru
Package utils provides utility fns for maru
Index ¶
- func FormatEnvVar(name, value string) string
- func JoinURLRepoPath(currentURL *url.URL, includeFilePath string) (*url.URL, error)
- func MakeTempDir(basePath string) (string, error)
- func MergeEnv(env1, env2 []string) []string
- func ReadRemoteYaml(location string, destConfig any, auth map[string]string) (err error)
- func ReadYaml(path string, destConfig any) error
- func TemplateString[T any](setVariableMap variables.SetVariableMap[T], s string) string
- func TemplateTaskAction[T any](action types.Action, withs map[string]string, ...) (types.Action, error)
- func UseLogFile() error
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 JoinURLRepoPath ¶ added in v0.5.0
JoinURLRepoPath joins a path in a URL (detecting the URL type)
func MakeTempDir ¶ added in v0.2.0
MakeTempDir creates a temp directory with the maru- 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 ReadRemoteYaml ¶ added in v0.5.0
ReadRemoteYaml makes a get request to retrieve a given file from a URL
func TemplateString ¶ added in v0.0.2
func TemplateString[T any](setVariableMap variables.SetVariableMap[T], s string) string
TemplateString replaces ${...} with the value from the template map
func TemplateTaskAction ¶ added in v0.2.3
func TemplateTaskAction[T any](action types.Action, withs map[string]string, inputs map[string]types.InputParameter, setVarMap variables.SetVariableMap[T]) (types.Action, error)
TemplateTaskAction templates a task's actions with the given inputs and variables
Types ¶
This section is empty.