MCPcopy Index your code
hub / github.com/ProspectOne/perfops-cli / initRootCmd

Function initRootCmd

cmd/root.go:86–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84}
85
86func initRootCmd() {
87 cobra.OnInitialize(initConfig)
88 apiKey = os.Getenv("PERFOPS_API_KEY")
89
90 rootCmd.PersistentFlags().StringVarP(&apiKey, "key", "K", "", "The PerfOps API key (default is $PERFOPS_API_KEY)")
91 rootCmd.PersistentFlags().BoolVarP(&showVersion, "version", "v", false, "Prints the version information of perfops")
92 rootCmd.PersistentFlags().BoolVarP(&debug, "debug", "", false, "Enables debug output")
93}
94
95// Common Flags for almost all tests we have
96func addCommonFlags(cmd *cobra.Command) {

Callers 5

ExecuteFunction · 0.85
TestEnvPerfOpsAPIKeyFunction · 0.85
TestVersionFlagFunction · 0.85
TestUsageFunction · 0.85
TestShowErrorOnlyFunction · 0.85

Calls

no outgoing calls

Tested by 4

TestEnvPerfOpsAPIKeyFunction · 0.68
TestVersionFlagFunction · 0.68
TestUsageFunction · 0.68
TestShowErrorOnlyFunction · 0.68