refactor: remove --debug flag, keep --verbose/-v only
This commit is contained in:
+4
-5
@@ -26,7 +26,7 @@ var (
|
||||
flagProvider string
|
||||
flagOutput string
|
||||
flagRaw bool
|
||||
flagDebug bool
|
||||
flagVerbose bool
|
||||
)
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
@@ -67,7 +67,7 @@ Use "ry [command] --help" for more information about a command.`,
|
||||
AccessKeyID: pc.AccessKeyID,
|
||||
AccessKeySecret: pc.AccessKeySecret,
|
||||
Endpoint: pc.Endpoint,
|
||||
Debug: flagDebug,
|
||||
Debug: flagVerbose,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -81,7 +81,7 @@ Use "ry [command] --help" for more information about a command.`,
|
||||
outputFormat = "raw"
|
||||
}
|
||||
out = output.New(outputFormat, os.Stdout)
|
||||
if flagDebug {
|
||||
if flagVerbose {
|
||||
fmt.Fprintf(os.Stderr, "[debug] provider: %s\n", providerName)
|
||||
fmt.Fprintf(os.Stderr, "[debug] config: %s\n", cfgPath)
|
||||
fmt.Fprintf(os.Stderr, "[debug] output: %s\n", outputFormat)
|
||||
@@ -95,8 +95,7 @@ func init() {
|
||||
rootCmd.PersistentFlags().StringVarP(&flagProvider, "provider", "p", "", "Cloud provider to use")
|
||||
rootCmd.PersistentFlags().StringVarP(&flagOutput, "output", "o", "", "Output format: table, json, yaml, raw")
|
||||
rootCmd.PersistentFlags().BoolVar(&flagRaw, "raw", false, "Output raw API response")
|
||||
rootCmd.PersistentFlags().BoolVarP(&flagDebug, "verbose", "v", false, "Enable verbose/debug output")
|
||||
rootCmd.PersistentFlags().BoolVar(&flagDebug, "debug", false, "Enable debug output")
|
||||
rootCmd.PersistentFlags().BoolVarP(&flagVerbose, "verbose", "v", false, "Enable verbose output")
|
||||
|
||||
completionCmd := &cobra.Command{
|
||||
Use: "completion [bash|zsh|fish]",
|
||||
|
||||
Reference in New Issue
Block a user