Beispiel #1
0
func main() {
	runtime.GOMAXPROCS(runtime.NumCPU())
	if err := app.Run(); err != nil {
		os.Exit(1)
	}
	os.Exit(0)
}
Beispiel #2
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
		},
	}
}
Beispiel #3
0
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
}
Beispiel #4
0
func main() {
	if err := app.Run(); err != nil {
		os.Exit(1)
	}
	os.Exit(0)
}