MCPcopy
hub / github.com/docker/compose / cacheDir

Function cacheDir

pkg/remote/cache.go:24–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22)
23
24func cacheDir() (string, error) {
25 cache, ok := os.LookupEnv("XDG_CACHE_HOME")
26 if ok {
27 return filepath.Join(cache, "docker-compose"), nil
28 }
29
30 path, err := osDependentCacheDir()
31 if err != nil {
32 return "", err
33 }
34 err = os.MkdirAll(path, 0o700)
35 return path, err
36}

Callers 2

LoadMethod · 0.85
LoadMethod · 0.85

Calls 2

MkdirAllMethod · 0.80
osDependentCacheDirFunction · 0.70

Tested by

no test coverage detected