Skip to content

Commit

Permalink
feat(cli): switch to single quotes in messages
Browse files Browse the repository at this point in the history
memsparkline used single quotes before the Go port.
I find them more readable.
They are also a better default in the POSIX shell.
  • Loading branch information
dbohdan committed Dec 1, 2024
1 parent 112f394 commit 9dc5601
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ Options:
Sparkline length (default: 20)
-m, --mem-format fmt
Format string for memory amounts (default: "%.1f")
Format string for memory amounts (default: '%.1f')
-n, --newlines
Print new sparkline on new line instead of over previous
-o, --output path
Output file to append to ("-" for standard error)
Output file to append to ('-' for standard error)
-q, --quiet
Do not print sparklines, only final report
Expand All @@ -118,10 +118,10 @@ Options:
How frequently to sample memory usage in ms (default: 200)
-t, --time-format fmt
Format string for run time (default: "%d:%02d:%04.1f")
Format string for run time (default: '%d:%02d:%04.1f')
-w, --wait ms
Set "--sample" and "--record" time simultaneously (that both options
Set '--sample' and '--record' time simultaneously (that both options
override)
```

Expand Down
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,13 @@ Options:
Sparkline length (default: %d)
-m, --mem-format fmt
Format string for memory amounts (default: %q)
Format string for memory amounts (default: '%v')
-n, --newlines
Print new sparkline on new line instead of over previous
-o, --output path
Output file to append to (%q for standard error)
Output file to append to ('%v' for standard error)
-q, --quiet
Do not print sparklines, only final report
Expand All @@ -173,10 +173,10 @@ Options:
How frequently to sample memory usage in ms (default: %d)
-t, --time-format fmt
Format string for run time (default: %q)
Format string for run time (default: '%v')
-w, --wait ms
Set "--sample" and "--record" time simultaneously (that both options override)
Set '--sample' and '--record' time simultaneously (that both options override)
`,
defaultLength,
defaultMemFormat,
Expand Down Expand Up @@ -235,7 +235,7 @@ loop:
i++

if i >= len(os.Args) {
usageError("no value for option %q", flag)
usageError("no value for option: %s", flag)
}

return os.Args[i]
Expand Down

0 comments on commit 9dc5601

Please sign in to comment.