{"modulePath":"github.com/hyperhq/hypercli","version":"v1.10.16","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package utils\n\n## Constants\n\n```go\nconst RestrictedNameChars = `[a-zA-Z0-9][a-zA-Z0-9_.-]`\n```\nRestrictedNameChars collects the characters allowed to represent a name, normally used to validate container and volume names.\n\n## Variables\n\n```go\nvar RestrictedNamePattern = regexp.MustCompile(`^/?` + RestrictedNameChars + `+$`)\n```\nRestrictedNamePattern is a regular expression to validate names against the collection of restricted characters.\n\n```go\nvar RestrictedVolumeNamePattern = regexp.MustCompile(`^` + RestrictedNameChars + `+$`)\n```\nRestrictedVolumeNamePattern is a regular expression to validate volume names against the collection of restricted characters.\n\n## Functions\n\n```go\nfunc DisableDebug()\n```\nDisableDebug sets the DEBUG env var to false and makes the logger to log at info level.\n\n```go\nfunc EnableDebug()\n```\nEnableDebug sets the DEBUG env var to true and makes the logger to log at debug level.\n\n```go\nfunc ExperimentalBuild() bool\n```\nExperimentalBuild is a stub which always returns false for builds that do not include the \"experimental\" build tag\n\n```go\nfunc GetCallerName(depth int) string\n```\nGetCallerName introspects the call stack and returns the name of the function \\`depth\\` levels down in the stack.\n\n```go\nfunc GetErrorMessage(err error) string\n```\nGetErrorMessage returns the human readable message associated with the passed-in error. In some cases the default Error() func returns something that is less than useful so based on its types this func will go and get a better piece of text.\n\n```go\nfunc IsDebugEnabled() bool\n```\nIsDebugEnabled checks whether the debug flag is set or not.\n\n```go\nfunc ReplaceOrAppendEnvValues(defaults, overrides []string) []string\n```\nReplaceOrAppendEnvValues returns the defaults with the overrides either replaced by env key or appended to the list\n\n```go\nfunc TestDirectory(templateDir string) (dir string, err error)\n```\nTestDirectory creates a new temporary directory and returns its path. The contents of directory at path \\`templateDir\\` is copied into the new directory.\n\n","path":"github.com/hyperhq/hypercli/utils","name":"utils","synopsis":"","isRedistributable":true}
