Skip to content

Commit

Permalink
Don't give extra default value in help string
Browse files Browse the repository at this point in the history
  • Loading branch information
bkircher committed Aug 13, 2020
1 parent d291603 commit 847fc51
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,30 @@ Note: this tool is still in the making and beta quality. Feel free to try it out

```txt
$ gscloud --help
gscloud is the CLI for the gridscale cloud.
gscloud lets you manage objects on gridscale.io via command line. It provides a Docker-CLI comparable command line that allows you to create, manipulate, and remove objects on gridscale.io.
Usage:
gscloud [command]
Available Commands:
completion Generate completion script
completion Generate shell completion scripts
help Help about any command
kubernetes Operate managed Kubernetes clusters
make-config Create a new configuration file
manpage Create man-pages for gscloud
network Operations on networks
server Operations on servers
ssh-key Operations on SSH keys
storage Operations on storages
template Operations on templates
version Print the version
Flags:
--account string Specify the account used; 'default' if none given
--config string Specify a configuration file; default ~/.config/gscloud/config.yaml
--account string Specify the account used (default "default")
--config string Specify a configuration file (default "~/.config/gscloud/config.yaml")
-h, --help Print usage
-j, --json Print JSON to stdout instead of a table
--noheading Do not print column headings
-q, --quiet Print only IDs of objects
Use "gscloud [command] --help" for more information about a command.
Expand Down
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ func init() {
cobra.OnInitialize(initConfig, initRuntime)
}

rootCmd.PersistentFlags().StringVar(&configFile, "config", "", fmt.Sprintf("Specify a configuration file; default %s", runtime.ConfigPath()))
rootCmd.PersistentFlags().StringVarP(&account, "account", "", "default", "Specify the account used; 'default' if none given")
rootCmd.PersistentFlags().StringVar(&configFile, "config", runtime.ConfigPath(), fmt.Sprintf("Specify a configuration file"))
rootCmd.PersistentFlags().StringVarP(&account, "account", "", "default", "Specify the account used")
rootCmd.PersistentFlags().BoolVarP(&jsonFlag, "json", "j", false, "Print JSON to stdout instead of a table")
rootCmd.PersistentFlags().BoolVarP(&renderOpts.NoHeader, "noheading", "", false, "Do not print column headings")
rootCmd.PersistentFlags().BoolVarP(&quietFlag, "quiet", "q", false, "Print only IDs of objects")
Expand Down

0 comments on commit 847fc51

Please sign in to comment.