func main() { runtime.GOMAXPROCS(runtime.NumCPU()) if err := app.Run(); err != nil { os.Exit(1) } os.Exit(0) }
func NewKubectlServer() *Server { return &Server{ name: "kubectl", SimpleUsage: "Kubernetes command line client", Long: "Kubernetes command line client", Run: func(s *Server, args []string) error { os.Args = os.Args[1:] if err := app.Run(); err != nil { os.Exit(1) } os.Exit(0) return nil }, } }
func NewKubectlServer() *Server { hks := &Server{ name: "kubectl", SimpleUsage: "Kubernetes command line client", Long: "Kubernetes command line client", Run: func(s *Server, args []string) error { os.Args = os.Args[1:] if err := app.Run(); err != nil { os.Exit(1) } os.Exit(0) return nil }, } if len(os.Args) > 2 { app.AddFlags(hks.Flags(), os.Args[2]) } else { app.AddFlags(hks.Flags(), "") } return hks }
func main() { if err := app.Run(); err != nil { os.Exit(1) } os.Exit(0) }