summaryrefslogtreecommitdiff
path: root/cmd/podman/rmi.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/rmi.go')
-rw-r--r--cmd/podman/rmi.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/cmd/podman/rmi.go b/cmd/podman/rmi.go
index 5b8bf1ea3..149cd8d82 100644
--- a/cmd/podman/rmi.go
+++ b/cmd/podman/rmi.go
@@ -13,7 +13,7 @@ import (
var (
rmiCommand cliconfig.RmiValues
- rmiDescription = "Removes one or more locally stored images."
+ rmiDescription = "Removes one or more previously pulled or locally created images."
_rmiCommand = cobra.Command{
Use: "rmi [flags] IMAGE [IMAGE...]",
Short: "Removes one or more images from local storage",
@@ -29,12 +29,17 @@ var (
}
)
+func rmiInit(command *cliconfig.RmiValues) {
+ command.SetHelpTemplate(HelpTemplate())
+ command.SetUsageTemplate(UsageTemplate())
+ flags := command.Flags()
+ flags.BoolVarP(&command.All, "all", "a", false, "Remove all images")
+ flags.BoolVarP(&command.Force, "force", "f", false, "Force Removal of the image")
+}
+
func init() {
rmiCommand.Command = &_rmiCommand
- rmiCommand.SetUsageTemplate(UsageTemplate())
- flags := rmiCommand.Flags()
- flags.BoolVarP(&rmiCommand.All, "all", "a", false, "Remove all images")
- flags.BoolVarP(&rmiCommand.Force, "force", "f", false, "Force Removal of the image")
+ rmiInit(&rmiCommand)
}
func rmiCmd(c *cliconfig.RmiValues) error {