Merge pull request #733 from kunalkushwaha/dist-cli-restructure

dist cli reorganized into sub-commands
This commit is contained in:
Stephen Day 2017-04-24 13:56:13 -05:00 committed by GitHub
commit 8f524ad42c
2 changed files with 26 additions and 9 deletions

5
cmd/dist/images.go vendored
View File

@ -13,8 +13,9 @@ import (
"github.com/urfave/cli"
)
var imagesCommand = cli.Command{
Name: "images",
var imagesListCommand = cli.Command{
Name: "list",
Aliases: []string{"images"},
Usage: "list images known to containerd",
ArgsUsage: "[flags] <ref>",
Description: `List images registered with containerd.`,

30
cmd/dist/main.go vendored
View File

@ -61,16 +61,11 @@ distribution tool
},
}
app.Commands = []cli.Command{
imagesCommand,
rmiCommand,
imageCommand,
contentCommand,
pullCommand,
fetchCommand,
fetchObjectCommand,
ingestCommand,
activeCommand,
getCommand,
deleteCommand,
listCommand,
applyCommand,
rootfsCommand,
}
@ -93,3 +88,24 @@ distribution tool
os.Exit(1)
}
}
var imageCommand = cli.Command{
Name: "image",
Usage: "image management",
Subcommands: cli.Commands{
imagesListCommand,
rmiCommand,
},
}
var contentCommand = cli.Command{
Name: "content",
Usage: "content management",
Subcommands: cli.Commands{
listCommand,
ingestCommand,
activeCommand,
getCommand,
deleteCommand,
},
}