github.com/containers/libpod@v1.9.4-0.20220419124438-4284fd425507/cmd/podmanV2/images/images.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 // podman _images_ Alias for podman image _list_ 13 imagesCmd = &cobra.Command{ 14 Use: strings.Replace(listCmd.Use, "list", "images", 1), 15 Args: listCmd.Args, 16 Short: listCmd.Short, 17 Long: listCmd.Long, 18 PreRunE: preRunE, 19 RunE: listCmd.RunE, 20 Example: strings.Replace(listCmd.Example, "podman image list", "podman images", -1), 21 } 22 ) 23 24 func init() { 25 registry.Commands = append(registry.Commands, registry.CliCommand{ 26 Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode}, 27 Command: imagesCmd, 28 }) 29 imagesCmd.SetHelpTemplate(registry.HelpTemplate()) 30 imagesCmd.SetUsageTemplate(registry.UsageTemplate()) 31 32 imageListFlagSet(imagesCmd.Flags()) 33 }