mirror of
https://github.com/kopia/kopia.git
synced 2026-03-12 11:16:25 -04:00
* 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
29 lines
599 B
Go
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))
|
|
}
|