github.com/verrazzano/verrazzano@v1.7.0/tools/vz/main.go (about) 1 // Copyright (c) 2022, Oracle and/or its affiliates. 2 // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 4 package main 5 6 import ( 7 "os" 8 9 "github.com/spf13/pflag" 10 "github.com/verrazzano/verrazzano/tools/vz/cmd/helpers" 11 "github.com/verrazzano/verrazzano/tools/vz/cmd/root" 12 "k8s.io/cli-runtime/pkg/genericclioptions" 13 ) 14 15 func main() { 16 flags := pflag.NewFlagSet("vz", pflag.ExitOnError) 17 pflag.CommandLine = flags 18 19 rc := helpers.NewRootCmdContext(genericclioptions.IOStreams{In: os.Stdin, Out: os.Stdout, ErrOut: os.Stderr}) 20 rootCmd := root.NewRootCmd(rc) 21 if err := rootCmd.Execute(); err != nil { 22 os.Exit(1) 23 } 24 }