github.com/unionj-cloud/go-doudou/v2@v2.3.5/cmd/shutdown.go (about) 1 package cmd 2 3 import ( 4 "github.com/spf13/cobra" 5 "github.com/unionj-cloud/go-doudou/v2/cmd/internal/svc" 6 ) 7 8 // shutdownCmd shutdowns k8s service 9 var shutdownCmd = &cobra.Command{ 10 Use: "shutdown", 11 Short: "wrap kubectl delete command to shutdown service", 12 Long: ``, 13 Run: func(cmd *cobra.Command, args []string) { 14 s := svc.NewSvc("") 15 s.Shutdown(k8sfile) 16 }, 17 } 18 19 func init() { 20 svcCmd.AddCommand(shutdownCmd) 21 }