Documentation ¶
Index ¶
- Variables
- func BoolPtr(b bool) *bool
- func CreateTar(w io.Writer, root string, paths []string) error
- func CreateTarGz(w io.Writer, root string, paths []string) error
- func ExecuteEnvTemplate(envTemplate *template.Template, customMap map[string]string) (string, error)
- func Expand(text, key, value string) string
- func ExpandPathsGlob(workingDir string, paths []string) ([]string, error)
- func IsSupportedKubernetesFormat(n string) bool
- func ParseEnvTemplate(t string) (*template.Template, error)
- func RandomID() string
- func ReadConfiguration(filename string) ([]byte, error)
- func RemoveFromSlice(s []string, target string) []string
- func RunCmd(cmd *exec.Cmd) error
- func RunCmdOut(cmd *exec.Cmd) ([]byte, error)
- func StrSliceContains(sl []string, s string) bool
- func StringPtr(s string) *string
- func VerifyOrCreateFile(path string) error
- type Command
- type Commander
Constants ¶
This section is empty.
Variables ¶
var OSEnviron = os.Environ
Functions ¶
func ExecuteEnvTemplate ¶ added in v0.7.0
func ExecuteEnvTemplate(envTemplate *template.Template, customMap map[string]string) (string, error)
ExecuteEnvTemplate executes an envTemplate based on OS environment variables and a custom map
func Expand ¶ added in v0.15.0
Expand replaces placeholders for a given key with a given value. It supports the ${key} and the $key syntax.
func ExpandPathsGlob ¶
ExpandPathsGlob expands paths according to filepath.Glob patterns Returns a list of unique files that match the glob patterns passed in.
func IsSupportedKubernetesFormat ¶
IsSupportedKubernetesFormat is for determining if a file under a glob pattern is deployable file format. It makes no attempt to check whether or not the file is actually deployable or has the correct contents.
func ParseEnvTemplate ¶ added in v0.7.0
ParseEnvTemplate is a simple wrapper to parse an env template
func ReadConfiguration ¶ added in v0.4.0
func RemoveFromSlice ¶ added in v0.14.0
RemoveFromSlice removes a string from a slice of strings
func StrSliceContains ¶
func VerifyOrCreateFile ¶ added in v0.13.0
VerifyOrCreateFile checks if a file exists at the given path, and if not, creates all parent directories and creates the file.
Types ¶
type Command ¶
Command is an interface used to run commands. All packages should use this interface instead of calling exec.Cmd directly.