MCPcopy
hub / github.com/jaypipes/ghw / WithChroot

Function WithChroot

internal/config/context.go:41–45  ·  view source on GitHub ↗

WithChroot allows overriding the root directory ghw examines.

(path string)

Source from the content-addressed store, hash-verified

39
40// WithChroot allows overriding the root directory ghw examines.
41func WithChroot(path string) Modifier {
42 return func(ctx context.Context) context.Context {
43 return context.WithValue(ctx, chrootKey, path)
44 }
45}
46
47// Chroot gets a context's chroot override or the default if none is set.
48func Chroot(ctx context.Context) string {

Callers 5

TestDiskPartLabelFunction · 0.92
TestDiskFSLabelFunction · 0.92
TestDiskTypeUdevFunction · 0.92
TestDiskPartUUIDFunction · 0.92

Calls

no outgoing calls

Tested by 5

TestDiskPartLabelFunction · 0.74
TestDiskFSLabelFunction · 0.74
TestDiskTypeUdevFunction · 0.74
TestDiskPartUUIDFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…