MCPcopy Index your code
hub / github.com/linuxkit/linuxkit / cacheLsCmd

Function cacheLsCmd

src/cmd/linuxkit/cache_ls.go:9–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7)
8
9func cacheLsCmd() *cobra.Command {
10 cmd := &cobra.Command{
11 Use: "ls",
12 Short: "list images in the linuxkit cache",
13 Long: `List images in the linuxkit cache.`,
14 RunE: func(cmd *cobra.Command, args []string) error {
15 // list all of the images and content in the cache
16 images, err := cachepkg.ListImages(cacheDir)
17 if err != nil {
18 log.Fatalf("error reading image names: %v", err)
19 }
20 log.Printf("%-80s %s", "image name", "root manifest hash")
21 for name, hash := range images {
22 log.Printf("%-80s %s", name, hash)
23 }
24 return nil
25 },
26 }
27 return cmd
28}

Callers 1

cacheCmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected