MCPcopy Index your code
hub / github.com/docker/cli / Dir

Function Dir

cli/config/config.go:77–85  ·  view source on GitHub ↗

Dir returns the directory the configuration file is stored in

()

Source from the content-addressed store, hash-verified

75
76// Dir returns the directory the configuration file is stored in
77func Dir() string {
78 initConfigDir.Do(func() {
79 configDir = os.Getenv(EnvOverrideConfigDir)
80 if configDir == "" {
81 configDir = filepath.Join(getHomeDir(), configFileDir)
82 }
83 })
84 return configDir
85}
86
87// ContextStoreDir returns the directory the docker contexts are stored in
88func ContextStoreDir() string {

Callers 8

setupConfigDirFunction · 0.85
TestConfigDirFunction · 0.85
TestConfigPathFunction · 0.85
TestSetDirFunction · 0.85
ContextStoreDirFunction · 0.85
PathFunction · 0.85
LoadFunction · 0.85
LoadDefaultConfigFileFunction · 0.85

Calls 1

getHomeDirFunction · 0.85

Tested by 4

setupConfigDirFunction · 0.68
TestConfigDirFunction · 0.68
TestConfigPathFunction · 0.68
TestSetDirFunction · 0.68