Use Cobra's Example field for config get/set examples

This commit is contained in:
Mislav Marohnić 2020-06-11 16:44:08 +02:00
parent 8ffbc24c65
commit 8e90c27c46

View file

@ -32,13 +32,10 @@ Current respected settings:
var configGetCmd = &cobra.Command{
Use: "get <key>",
Short: "Prints the value of a given configuration key",
Long: `Get the value for a given configuration key.
Examples:
$ gh config get git_protocol
https
Short: "Print the value of a given configuration key",
Example: `
$ gh config get git_protocol
https
`,
Args: cobra.ExactArgs(1),
RunE: configGet,
@ -46,12 +43,9 @@ Examples:
var configSetCmd = &cobra.Command{
Use: "set <key> <value>",
Short: "Updates configuration with the value of a given key",
Long: `Update the configuration by setting a key to a value.
Examples:
$ gh config set editor vim
Short: "Update configuration with a value for the given key",
Example: `
$ gh config set editor vim
`,
Args: cobra.ExactArgs(2),
RunE: configSet,