MCPcopy Create free account
hub / github.com/docker/docker-agent / SetCacheDir

Function SetCacheDir

pkg/paths/paths.go:40–40  ·  view source on GitHub ↗

SetCacheDir overrides the default cache directory returned by [GetCacheDir]. An empty value restores the default behaviour. This should be called early (e.g. during CLI flag processing) before any goroutine calls the corresponding getter.

(dir string)

Source from the content-addressed store, hash-verified

38// This should be called early (e.g. during CLI flag processing) before any
39// goroutine calls the corresponding getter.
40func SetCacheDir(dir string) { cacheDirOverride.Set(dir) }
41
42// SetConfigDir overrides the default config directory returned by [GetConfigDir].
43// An empty value restores the default behaviour.

Callers 2

NewRootCmdFunction · 0.92
SetRootFunction · 0.85

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected