Documentation ¶
Index ¶
- func AskForConfirmation(s string) (bool, error)
- func EnvExists(key string) bool
- func GetEnv(key, fallback string) string
- func InArray(a []string, v string) (ret bool, i int)
- func IsBoolArrayTrue(array []bool) bool
- func Max(x, y int64) int64
- func Min(x, y int64) int64
- func RandStringBytesMaskImprSrc(n int) string
- func RemoveCommonElements(a, b []string) []string
- func TruncateString(str string, n int) string
- func YesNoToBool(s string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskForConfirmation ¶
askForConfirmation asks the user for confirmation. A user must type in "yes" or "no" and then press enter. It has fuzzy matching, so "y", "Y", "yes", "YES", and "Yes" all count as confirmations. If the input is not recognized, it will ask again. The function does not return until it gets a valid response from the user.
func IsBoolArrayTrue ¶ added in v0.0.39
* IsBoolArrayTrue checks whether the array contains only true elements
func RemoveCommonElements ¶ added in v0.0.39
* RemoveCommonElements removes the common elements and returns the first array
func TruncateString ¶ added in v0.0.39
func YesNoToBool ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.