MCPcopy Index your code
hub / github.com/kopia/kopia / setup

Method setup

cli/command_content_show.go:21–30  ·  view source on GitHub ↗
(svc appServices, parent commandParent)

Source from the content-addressed store, hash-verified

19}
20
21func (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
32func (c *commandContentShow) run(ctx context.Context, rep repo.DirectRepository) error {
33 contentIDs, err := toContentIDs(c.ids)

Callers

nothing calls this directly

Calls 2

CommandMethod · 0.80

Tested by

no test coverage detected