MCPcopy Index your code
hub / github.com/kubernetes-sigs/controller-runtime / Do

Method Do

tools/setup-envtest/workflows/workflows.go:26–46  ·  view source on GitHub ↗

Do executes this workflow.

(env *envp.Env)

Source from the content-addressed store, hash-verified

24
25// Do executes this workflow.
26func (f Use) Do(env *envp.Env) {
27 ctx := logr.NewContext(context.TODO(), env.Log.WithName("use"))
28 env.EnsureBaseDirs(ctx)
29 if f.UseEnv {
30 // the env var unconditionally
31 if env.PathMatches(f.AssetsPath) {
32 env.PrintInfo(f.PrintFormat)
33 return
34 }
35 }
36 env.EnsureVersionIsSet(ctx)
37 if env.ExistsAndValid() {
38 env.PrintInfo(f.PrintFormat)
39 return
40 }
41 if env.NoDownload {
42 envp.Exit(2, "no such version (%s) exists on disk for this architecture (%s) -- try running `list -i` to see what's on disk", env.Version, env.Platform)
43 }
44 env.Fetch(ctx)
45 env.PrintInfo(f.PrintFormat)
46}
47
48// List is a workflow that lists version-platform pairs in the store
49// and on the remote server that match the given filter.

Callers 15

mainFunction · 0.45
GetVersionMethod · 0.45
getIndexMethod · 0.45
workflows_test.goFile · 0.45
makeListWatcherMethod · 0.45
CreateMethod · 0.45
UpdateMethod · 0.45
DeleteMethod · 0.45
DeleteAllOfMethod · 0.45
PatchMethod · 0.45
ApplyMethod · 0.45
GetMethod · 0.45

Calls 7

EnsureBaseDirsMethod · 0.80
PathMatchesMethod · 0.80
PrintInfoMethod · 0.80
EnsureVersionIsSetMethod · 0.80
ExistsAndValidMethod · 0.80
FetchMethod · 0.80
WithNameMethod · 0.45

Tested by

no test coverage detected