(svc appServices, parent commandParent)
| 19 | } |
| 20 | |
| 21 | func (c *commandContentShow) setup(svc appServices, parent commandParent) { |
| 22 | cmd := parent.Command("show", "Show contents by ID.").Alias("cat") |
| 23 | |
| 24 | cmd.Arg("id", "IDs of contents to show").Required().StringsVar(&c.ids) |
| 25 | cmd.Flag("json", "Pretty-print JSON content").Short('j').BoolVar(&c.indentJSON) |
| 26 | cmd.Flag("unzip", "Transparently decompress the content").Short('z').BoolVar(&c.decompress) |
| 27 | cmd.Action(svc.directRepositoryReadAction(c.run)) |
| 28 | |
| 29 | c.out.setup(svc) |
| 30 | } |
| 31 | |
| 32 | func (c *commandContentShow) run(ctx context.Context, rep repo.DirectRepository) error { |
| 33 | contentIDs, err := toContentIDs(c.ids) |
nothing calls this directly
no test coverage detected