Documentation ¶
Index ¶
- Variables
- func CheckLatestVersion(currentVersion string)
- func CleanUpInterfaceMap(in map[interface{}]interface{}) map[string]interface{}
- func Cmd(conf *config.Config, program string, args ...string) error
- func CompareFileContent(filename, content string) (bool, error)
- func Confirm(msg string) bool
- func CopyDir(src string, dst string) error
- func CopyFile(src, dest string) error
- func Dedupe(l []string) []string
- func DownloadFile(filepath string, url string) error
- func EmptyDirectory(dir string) error
- func Error(line string, args ...interface{})
- func Exec(program string, args ...string) error
- func Execute(cmd *exec.Cmd) error
- func ExecuteWithOutput(cmd *exec.Cmd) (string, error)
- func Exists(path string) bool
- func FileExists(val interface{}) error
- func GenAESKey() string
- func GetEnvBoolValue(key string) (bool, bool)
- func GetEnvStringValue(key string) (string, bool)
- func Highlight(line string, args ...interface{})
- func HighlightError(err error) error
- func IsDir(path string) bool
- func IsEmpty(name string) (bool, error)
- func ListDirectory(dir string) ([]string, error)
- func LogError() *log.Logger
- func LogInfo() *log.Logger
- func Map[T any, R SimpleType](slice []T, mapper func(elem T) R) []R
- func MapLua(tbl *lua.LTable, st interface{}) error
- func MkCmd(conf *config.Config, program string, args ...string) *exec.Cmd
- func ParseJSONPath(input string, data interface{}) error
- func PatchInterfaceMap(defaultValues, values map[string]map[string]interface{}) (map[string]map[string]interface{}, error)
- func Pluralize(one, many string, count int) string
- func PrintTable[T any](list []T, headers []string, rowFun func(T) ([]string, error)) error
- func ProjectRoot() (root string, found bool)
- func ReadAlphaNum(prompt string) (string, error)
- func ReadAlphaNumDefault(prompt string, def string) (string, error)
- func ReadFile(name string) (string, error)
- func ReadLine(prompt string) (string, error)
- func ReadLineDefault(prompt string, def string) (string, error)
- func ReadPwd(prompt string) (string, error)
- func RegexValidator(regex, message string) survey.Validator
- func RelaxedJSONPathExpression(pathExpression string) (string, error)
- func RemoveNulls(m map[string]interface{})
- func Sha(bv []byte) string
- func Sha256(path string) (string, error)
- func Success(line string, args ...interface{})
- func Tar(src string, w io.Writer, regex string) error
- func ToGoValue(lv lua.LValue) interface{}
- func ToString(val interface{}) string
- func Untar(r io.Reader, dir, relpath string) error
- func ValidateDns(val string) error
- func ValidateRegex(val, regex, message string) error
- func ValidateSingleLevelDeep(val, subdomain string) error
- func WaitFor(timeout, interval time.Duration, f func() (bool, error)) error
- func Warn(line string, args ...interface{})
- func Which(command string) (exists bool, path string)
- func WriteFile(name string, content []byte) error
- func YamlFile(name string, out interface{}) error
- type Mapper
- type Printer
- type SimpleType
- type Versions
Constants ¶
This section is empty.
Variables ¶
View Source
var EnableDebug bool
View Source
var ValidateAlphaNumeric = survey.ComposeValidators( survey.Required, RegexValidator("[a-z][0-9\\-a-z]+", "Must be an alphanumeric string"), )
View Source
var ValidateResourceGroupName = survey.ComposeValidators( survey.Required, RegexValidator("[a-z][a-z0-9]{2,62}", "Must be between 3 and 63 characters in length, start with lowercase letter and may contain numbers and lowercase letters only"), )
ValidateResourceGroupName validates Azure resource group names.
View Source
var ValidateStorageAccountName = survey.ComposeValidators( survey.Required, RegexValidator("[a-z][a-z0-9]{2,23}", "Must be between 3 and 24 characters in length, start with lowercase letter and may contain numbers and lowercase letters only"), )
ValidateStorageAccountName validates Azure storage account names.
Functions ¶
func CheckLatestVersion ¶
func CheckLatestVersion(currentVersion string)
func CleanUpInterfaceMap ¶
func CleanUpInterfaceMap(in map[interface{}]interface{}) map[string]interface{}
func CompareFileContent ¶
func DownloadFile ¶
func EmptyDirectory ¶
func FileExists ¶
func FileExists(val interface{}) error
func GetEnvBoolValue ¶
func GetEnvStringValue ¶
func HighlightError ¶
func ListDirectory ¶ added in v0.9.3
func Map ¶
func Map[T any, R SimpleType](slice []T, mapper func(elem T) R) []R
func ParseJSONPath ¶ added in v0.11.0
func PatchInterfaceMap ¶
func PrintTable ¶
func ProjectRoot ¶
func ReadAlphaNum ¶
func RegexValidator ¶
func RegexValidator(regex, message string) survey.Validator
func RelaxedJSONPathExpression ¶ added in v0.11.0
func RemoveNulls ¶
func RemoveNulls(m map[string]interface{})
func ValidateDns ¶
func ValidateRegex ¶
func ValidateSingleLevelDeep ¶
Types ¶
type Printer ¶
type Printer interface {
PrettyPrint()
}
func NewJsonPrinter ¶
func NewJsonPrinter(i interface{}) Printer
func NewYAMLPrinter ¶
func NewYAMLPrinter(i interface{}) Printer
type SimpleType ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.