package utils
import "github.com/docker/docker/utils"
Index ¶
- Constants
- Variables
- func DisableDebug()
- func EnableDebug()
- func GetCallerName(depth int) string
- func IsDebugEnabled() bool
- func ReplaceOrAppendEnvValues(defaults, overrides []string) []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.
Functions ¶
func DisableDebug ¶
func DisableDebug()
DisableDebug sets the DEBUG env var to false and makes the logger to log at info level.
func EnableDebug ¶
func EnableDebug()
EnableDebug sets the DEBUG env var to true and makes the logger to log at debug level.
func GetCallerName ¶
GetCallerName introspects the call stack and returns the name of the function `depth` levels down in the stack.
func IsDebugEnabled ¶
func IsDebugEnabled() bool
IsDebugEnabled checks whether the debug flag is set or not.
func ReplaceOrAppendEnvValues ¶
ReplaceOrAppendEnvValues returns the defaults with the overrides either replaced by env key or appended to the list
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.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
utils/templates |
- Version
- v1.13.0-rc6
- Published
- Jan 11, 2017
- Platform
- js/wasm
- Imports
- 9 packages
- Last checked
- 4 minutes ago –
Tools for package owners.