(ctx context.Context, rep repo.Repository)
| 25 | } |
| 26 | |
| 27 | func (c *commandShow) run(ctx context.Context, rep repo.Repository) error { |
| 28 | oid, err := snapshotfs.ParseObjectIDWithPath(ctx, rep, c.path) |
| 29 | if err != nil { |
| 30 | return errors.Wrapf(err, "unable to parse ID: %v", c.path) |
| 31 | } |
| 32 | |
| 33 | r, err := rep.OpenObject(ctx, oid) |
| 34 | if err != nil { |
| 35 | return errors.Wrapf(err, "error opening object %v", oid) |
| 36 | } |
| 37 | |
| 38 | defer r.Close() //nolint:errcheck |
| 39 | |
| 40 | return errors.Wrap(iocopy.JustCopy(c.out.stdout(), r), "unable to copy data") |
| 41 | } |
nothing calls this directly
no test coverage detected