Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
()
| 52 | // Execute adds all child commands to the root command and sets flags appropriately. |
| 53 | // This is called by main.main(). It only needs to happen once to the rootCmd. |
| 54 | func Execute() { |
| 55 | if err := RootCmd.Execute(); err != nil { |
| 56 | fatal(err.Error(), 1) |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | var varApiKey = "CRONITOR_API_KEY" |
| 61 | var varEnv = "CRONITOR_ENV" |