Documentation ¶
Index ¶
- Constants
- Variables
- func DockerInitPath(localCopy string) string
- func ExperimentalBuild() bool
- func GetCallerName(depth int) string
- func GetErrorMessage(err error) string
- func ReplaceOrAppendEnvValues(defaults, overrides []string) []string
- func SelfPath() string
- func TestDirectory(templateDir string) (dir string, err error)
Constants ¶
const RestrictedNameChars = `[a-zA-Z0-9][a-zA-Z0-9_.-]`
RestrictedNameChars collects the characters allowed to represent a name, normally used to validate container and volume names.
Variables ¶
var RestrictedNamePattern = regexp.MustCompile(`^/?` + RestrictedNameChars + `+$`)
RestrictedNamePattern is a regular expression to validate names against the collection of restricted characters.
var RestrictedVolumeNamePattern = regexp.MustCompile(`^` + RestrictedNameChars + `+$`)
RestrictedVolumeNamePattern is a regular expression to validate volume names against the collection of restricted characters.
Functions ¶
func DockerInitPath ¶
DockerInitPath figures out the path of our dockerinit (which may be SelfPath())
func ExperimentalBuild ¶
func ExperimentalBuild() bool
ExperimentalBuild is a stub which always returns false for builds that do not include the "experimental" build tag
func GetCallerName ¶
GetCallerName introspects the call stack and returns the name of the function `depth` levels down in the stack.
func GetErrorMessage ¶
GetErrorMessage 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.
func ReplaceOrAppendEnvValues ¶
ReplaceOrAppendEnvValues returns the defaults with the overrides either replaced by env key or appended to the list
func SelfPath ¶
func SelfPath() string
SelfPath figures out the absolute path of our own binary (if it's still around).
func TestDirectory ¶
TestDirectory creates a new temporary directory and returns its path. The contents of directory at path `templateDir` is copied into the new directory.
Types ¶
This section is empty.