MCPcopy Create free account
hub / github.com/docker/cli / runRemove

Function runRemove

cli/command/manifest/rm.go:27–49  ·  view source on GitHub ↗
(ctx context.Context, store manifeststore.Store, targets []string)

Source from the content-addressed store, hash-verified

25}
26
27func runRemove(ctx context.Context, store manifeststore.Store, targets []string) error {
28 var errs []error
29 for _, target := range targets {
30 if ctx.Err() != nil {
31 return ctx.Err()
32 }
33 targetRef, err := normalizeReference(target)
34 if err != nil {
35 errs = append(errs, err)
36 continue
37 }
38 _, err = store.GetList(targetRef)
39 if err != nil {
40 errs = append(errs, err)
41 continue
42 }
43 err = store.Remove(targetRef)
44 if err != nil {
45 errs = append(errs, err)
46 }
47 }
48 return errors.Join(errs...)
49}

Callers 1

newRmManifestListCommandFunction · 0.70

Calls 4

normalizeReferenceFunction · 0.85
ErrMethod · 0.65
GetListMethod · 0.65
RemoveMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…