Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // outJSON flag OutJSON bool DebugMode bool )
View Source
var RootCmd = &cobra.Command{ Use: "cld", Version: cliVersion, Short: "A brief description of your application", Long: `This CLI has been created to add additional functionality to https://docs.microsoft.com/en-us/cli/azure/ such as data aggregation from multiple 'az' commands, reporting, and pulling data from both Azure DevOps and Azure, as well as other functionality.`, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { if DebugMode { fmt.Println("DEBUG MODE") f, err := os.Create("profile.prof") if err != nil { panic(err) } defer f.Close() if err := pprof.StartCPUProfile(f); err != nil { panic(err) } defer pprof.StopCPUProfile() memProfileFile, err := os.Create("mem.prof") if err != nil { panic(err) } defer memProfileFile.Close() if err := pprof.WriteHeapProfile(memProfileFile); err != nil { panic(err) } fmt.Println("Memory profile written to mem.prof") traceFile, err := os.Create("trace.out") if err != nil { panic(err) } defer traceFile.Close() if err := trace.Start(traceFile); err != nil { panic(err) } defer trace.Stop() } return InitializeConfig(cmd) }, }
rootCmd represents the base command when called without any subcommands
Functions ¶
func Execute ¶
func Execute()
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.
func InitializeConfig ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.