Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // outJSON flag OutJSON bool DebugMode bool ShowChangelog bool )
View Source
var ChangelogFile string
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 Azure CLI such as data aggregation from multiple 'az' commands into a MongoDB Dababase, reporting, and pulling data from both Azure DevOps and Azure, as well as other functionality. AWS functionality is also being added.`, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { if DebugMode { fmt.Println("DEBUG MODE") cmd.DebugFlags() 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) }, Run: func(cmd *cobra.Command, args []string) { if ShowChangelog { ViewChangelog(ChangelogFile) } if !ShowChangelog { cmd.Help() } }, }
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 ¶
func ViewChangelog ¶ added in v0.1.52
func ViewChangelog(mdString string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.