Skip to content

Commit

Permalink
bin/crypt: use string-literal for usage template
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Aug 26, 2021
1 parent fe3aa47 commit 05e09e4
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions bin/crypt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,16 @@ func main() {
}

func help() {
fmt.Fprintf(os.Stderr, "usage: %s COMMAND [arg...]", os.Args[0])
fmt.Fprintf(os.Stderr, "\n\n")
fmt.Fprintf(os.Stderr, "commands:\n")
fmt.Fprintf(os.Stderr, " get retrieve the value of a key\n")
fmt.Fprintf(os.Stderr, " list retrieve all values under a key\n")
fmt.Fprintf(os.Stderr, " set set the value of a key\n")
fmt.Fprintf(os.Stderr, "\n")
fmt.Fprintf(os.Stderr, "-plaintext don't encrypt or decrypt the values before storage or retrieval\n")
const usage = `usage: %s COMMAND [arg...]
commands:
get retrieve the value of a key
list retrieve all values under a key
set set the value of a key
-plaintext don't encrypt or decrypt the values before storage or retrieval
`

_, _ = fmt.Fprintf(os.Stderr, usage, os.Args[0])
os.Exit(1)
}

0 comments on commit 05e09e4

Please sign in to comment.