(ctx context.Context, rep repo.RepositoryWriter, m *snapshot.Manifest)
| 82 | } |
| 83 | |
| 84 | func (c *commandSnapshotDelete) deleteSnapshot(ctx context.Context, rep repo.RepositoryWriter, m *snapshot.Manifest) error { |
| 85 | desc := fmt.Sprintf("snapshot %v of %v at %v", m.ID, m.Source, formatTimestamp(m.StartTime.ToTime())) |
| 86 | |
| 87 | if !c.snapshotDeleteConfirm { |
| 88 | log(ctx).Infof("Would delete %v (pass --delete to confirm)", desc) |
| 89 | return nil |
| 90 | } |
| 91 | |
| 92 | log(ctx).Infof("Deleting %v...", desc) |
| 93 | |
| 94 | return errors.Wrap(rep.DeleteManifest(ctx, m.ID), "error deleting manifest") |
| 95 | } |
| 96 | |
| 97 | func (c *commandSnapshotDelete) deleteSnapshotsByRootObjectID(ctx context.Context, rep repo.RepositoryWriter, rootID string) error { |
| 98 | rootOID, err := object.ParseID(rootID) |
no test coverage detected