(ctx context.Context, store manifeststore.Store, targets []string)
| 25 | } |
| 26 | |
| 27 | func 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 | } |
no test coverage detected
searching dependent graphs…