CLI runs the Pixiecore commandline. This function always exits back to the OS when finished.
()
| 35 | // |
| 36 | // This function always exits back to the OS when finished. |
| 37 | func CLI() { |
| 38 | if v1compatCLI() { |
| 39 | return |
| 40 | } |
| 41 | |
| 42 | cobra.OnInitialize(initConfig) |
| 43 | if err := rootCmd.Execute(); err != nil { |
| 44 | fmt.Println(err) |
| 45 | os.Exit(-1) |
| 46 | } |
| 47 | os.Exit(0) |
| 48 | } |
| 49 | |
| 50 | // This represents the base command when called without any subcommands |
| 51 | var rootCmd = &cobra.Command{ |
no test coverage detected