github.com/containers/libpod@v1.9.4-0.20220419124438-4284fd425507/cmd/podmanV2/healthcheck/healthcheck.go (about) 1 package healthcheck 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: healthcheck 11 healthCmd = &cobra.Command{ 12 Use: "healthcheck", 13 Short: "Manage Healthcheck", 14 Long: "Manage Healthcheck", 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: healthCmd, 25 }) 26 healthCmd.SetHelpTemplate(registry.HelpTemplate()) 27 healthCmd.SetUsageTemplate(registry.UsageTemplate()) 28 } 29 30 func preRunE(cmd *cobra.Command, args []string) error { 31 _, err := registry.NewContainerEngine(cmd, args) 32 return err 33 }