Files
kopia/cli/command_manifest_rm.go
Jarek Kowalski 9d7cf71a37 Logging flags (#674)
* logging: cleaned up stderr logging

- do not show module
- do not show timestamps by default (enable with --console-timestamps)

* logging: replaced most printStderr() with log.Info

* cli: additional logging cleanup
2020-10-10 10:48:37 -07:00

29 lines
599 B
Go

package cli
import (
"context"
"github.com/kopia/kopia/repo"
)
var (
manifestRemoveCommand = manifestCommands.Command("rm", "Remove manifest items")
manifestRemoveItems = manifestRemoveCommand.Arg("item", "Items to remove").Required().Strings()
)
func runManifestRemoveCommand(ctx context.Context, rep repo.Repository) error {
advancedCommand(ctx)
for _, it := range toManifestIDs(*manifestRemoveItems) {
if err := rep.DeleteManifest(ctx, it); err != nil {
return err
}
}
return nil
}
func init() {
manifestRemoveCommand.Action(repositoryAction(runManifestRemoveCommand))
}