github.com/containers/libpod@v1.9.4-0.20220419124438-4284fd425507/cmd/podmanV2/images/rmi.go (about) 1 package images 2 3 import ( 4 "strings" 5 6 "github.com/containers/libpod/cmd/podmanV2/registry" 7 "github.com/containers/libpod/pkg/domain/entities" 8 "github.com/spf13/cobra" 9 ) 10 11 var ( 12 rmiCmd = &cobra.Command{ 13 Use: strings.Replace(rmCmd.Use, "rm ", "rmi ", 1), 14 Args: rmCmd.Args, 15 Short: rmCmd.Short, 16 Long: rmCmd.Long, 17 PreRunE: rmCmd.PreRunE, 18 RunE: rmCmd.RunE, 19 Example: strings.Replace(rmCmd.Example, "podman image rm", "podman rmi", -1), 20 } 21 ) 22 23 func init() { 24 registry.Commands = append(registry.Commands, registry.CliCommand{ 25 Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode}, 26 Command: rmiCmd, 27 }) 28 rmiCmd.SetHelpTemplate(registry.HelpTemplate()) 29 rmiCmd.SetUsageTemplate(registry.UsageTemplate()) 30 imageRemoveFlagSet(rmiCmd.Flags()) 31 }