MCPcopy Create free account
hub / github.com/conforma/cli / FS

Function FS

internal/utils/helpers.go:69–75  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

67const fsKey ioContextKey = 0
68
69func FS(ctx context.Context) afero.Fs {
70 if fs, ok := ctx.Value(fsKey).(afero.Fs); ok {
71 return fs
72 }
73
74 return afero.NewOsFs()
75}
76
77func WithFS(ctx context.Context, fs afero.Fs) context.Context {
78 return context.WithValue(ctx, fsKey, fs)

Callers 15

PreProcessPolicyFunction · 0.92
getPolicyThroughCacheFunction · 0.92
GetPolicyMethod · 0.92
choosePolicyFileFunction · 0.92
DetermineInputSpecFunction · 0.92
WriteInputFileMethod · 0.92
CloseMethod · 0.92
cloneFunction · 0.92
NewOPAEvaluatorFunction · 0.92
createDataDirectoryMethod · 0.92

Calls

no outgoing calls

Tested by 1