MCPcopy
hub / github.com/kopia/kopia / run

Method run

cli/command_policy_remove.go:24–43  ·  view source on GitHub ↗
(ctx context.Context, rep repo.RepositoryWriter)

Source from the content-addressed store, hash-verified

22}
23
24func (c *commandPolicyDelete) run(ctx context.Context, rep repo.RepositoryWriter) error {
25 targets, err := c.policyTargets(ctx, rep)
26 if err != nil {
27 return err
28 }
29
30 for _, target := range targets {
31 log(ctx).Infof("Removing policy on %q...", target)
32
33 if c.dryRun {
34 continue
35 }
36
37 if err := policy.RemovePolicy(ctx, rep, target); err != nil {
38 return errors.Wrapf(err, "error removing policy on %v", target)
39 }
40 }
41
42 return nil
43}

Callers

nothing calls this directly

Calls 2

RemovePolicyFunction · 0.92
policyTargetsMethod · 0.80

Tested by

no test coverage detected