Documentation ¶
Index ¶
- func ArrayDedup(a []string) []string
- func Contains(slice []string, search string) bool
- func CopyDir(src string, dst string) (err error)
- func CopyFile(src, dst string) (err error)
- func CreateReducedYAMLFile(filename, key string, required bool) ([]byte, error)
- func FuzzySemVerCompare(s1, s2 string) bool
- func GetAppVersion(ctx *ankh.ExecutionContext, ankhFile *ankh.AnkhFile) string
- func GetEnvironmentOrContext(environment string, context string) string
- func LineDiff(expected, found string) string
- func MapSliceRegexMatch(mapSlice yaml.MapSlice, key string) (interface{}, error)
- func MultiErrorFormat(errs []error) string
- func PromptForInput(defaultValue string, label string) (string, error)
- func PromptForPassword() (string, error)
- func PromptForSelection(choices []string, label string) (string, error)
- func PromptForSelectionWithAdd(choices []string, label string, addLabel string) (string, error)
- func PromptForUsername() (string, error)
- func ReplaceFormatVariables(format string, chart string, version string, env string) (string, error)
- func SemverBump(version string, semVerType string) (string, error)
- func Untar(dst string, r io.Reader) error
- type CustomFormatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayDedup ¶
func CopyDir ¶
CopyDir recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist. Symlinks are ignored and skipped.
func CopyFile ¶
CopyFile copies the contents of the file named src to the file named by dst. The file will be created if it does not already exist. If the destination file exists, all it's contents will be replaced by the contents of the source file. The file mode will be copied from the source and the copied data is synced/flushed to stable storage.
func CreateReducedYAMLFile ¶
func FuzzySemVerCompare ¶
Loosely fits the best-effot semver sort implemented by `sort -V`
func GetAppVersion ¶
func GetAppVersion(ctx *ankh.ExecutionContext, ankhFile *ankh.AnkhFile) string
func GetEnvironmentOrContext ¶
GetEnvironmentOrContext, given a enviroment and a context returns the non-empty value NOTE: context and enviroment should not both be provided
func MapSliceRegexMatch ¶
func MultiErrorFormat ¶
MultiErrorFormat takes a slice of errors and returns them as a combined string
func PromptForPassword ¶
func PromptForUsername ¶
func ReplaceFormatVariables ¶
Types ¶
type CustomFormatter ¶
type CustomFormatter struct {
IsTerminal bool
}