github.com/containers/libpod@v1.9.4-0.20220419124438-4284fd425507/cmd/podmanV2/pods/pod.go (about) 1 package pods 2 3 import ( 4 "github.com/containers/libpod/cmd/podmanV2/registry" 5 "github.com/containers/libpod/pkg/domain/entities" 6 "github.com/spf13/cobra" 7 ) 8 9 var ( 10 // Command: podman _pod_ 11 podCmd = &cobra.Command{ 12 Use: "pod", 13 Short: "Manage pods", 14 Long: "Manage pods", 15 TraverseChildren: true, 16 PersistentPreRunE: preRunE, 17 RunE: registry.SubCommandExists, 18 } 19 ) 20 21 func init() { 22 registry.Commands = append(registry.Commands, registry.CliCommand{ 23 Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode}, 24 Command: podCmd, 25 }) 26 podCmd.SetHelpTemplate(registry.HelpTemplate()) 27 podCmd.SetUsageTemplate(registry.UsageTemplate()) 28 } 29 30 func preRunE(cmd *cobra.Command, args []string) error { 31 _, err := registry.NewContainerEngine(cmd, args) 32 return err 33 }