MCPcopy Index your code
hub / github.com/docker/docker-agent / get

Method get

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

get returns the override if set, or falls back to the result of defaultFn.

(defaultFn func() string)

Source from the content-addressed store, hash-verified

21
22// get returns the override if set, or falls back to the result of defaultFn.
23func (o *overridable) get(defaultFn func() string) string {
24 if p := o.p.Load(); p != nil {
25 return filepath.Clean(*p)
26 }
27 return defaultFn()
28}
29
30var (
31 cacheDirOverride overridable

Callers 4

GetCacheDirFunction · 0.45
GetConfigDirFunction · 0.45
GetDataDirFunction · 0.45
TestOverridesFunction · 0.45

Calls 1

LoadMethod · 0.80

Tested by 1

TestOverridesFunction · 0.36