revert(Set/Get): reduces --help text; long explanation will go into actual documentation

This commit is contained in:
Lewis Wynne 2025-11-20 03:17:46 +00:00
parent 25b4363c5f
commit 13243e97a3
2 changed files with 3 additions and 14 deletions

View file

@ -41,14 +41,12 @@ var getCmd = &cobra.Command{
Short: "Get a value for a key. Optionally specify a db.", Short: "Get a value for a key. Optionally specify a db.",
Long: `Get a value for a key. Optionally specify a db. Long: `Get a value for a key. Optionally specify a db.
[[ .TEMPLATES ]] can be filled by passing TEMPLATE=VALUE as an {{ .TEMPLATES }} can be filled by passing TEMPLATE=VALUE as an
additional argument after the initial KEY being fetched. additional argument after the initial KEY being fetched.
For example: For example:
pda set greeting 'Hello, {{ .NAME }}!' pda set greeting 'Hello, {{ .NAME }}!'
pda get greeting NAME=World pda get greeting NAME=World`,
Further reading: Go's text/template documentation.`,
Aliases: []string{"g"}, Aliases: []string{"g"},
Args: cobra.MinimumNArgs(1), Args: cobra.MinimumNArgs(1),
RunE: get, RunE: get,

View file

@ -41,16 +41,7 @@ For example:
'Hello, {{ env "USER" }}' will fetch the USER env variable. 'Hello, {{ env "USER" }}' will fetch the USER env variable.
'Hello, {{ default "World" .NAME }}' will default to World if NAME is blank. 'Hello, {{ default "World" .NAME }}' will default to World if NAME is blank.
'Hello, {{ require .NAME }}' will error if NAME is blank. 'Hello, {{ require .NAME }}' will error if NAME is blank.
'{{ enum .NAME "Alice" "Bob" }}' allows only NAME=Alice or NAME=Bob. '{{ enum .NAME "Alice" "Bob" }}' allows only NAME=Alice or NAME=Bob.`,
[[ .TEMPLATES ]] can be filled by passing TEMPLATE=VALUE as an
additional argument after the initial KEY being fetched.
For example:
pda set greeting 'Hello, {{ .NAME }}!'
pda get greeting NAME=World
Further reading: Go's text/template documentation.`,
Aliases: []string{"s"}, Aliases: []string{"s"},
Args: cobra.RangeArgs(1, 2), Args: cobra.RangeArgs(1, 2),
RunE: set, RunE: set,