Skip to content

Commit

Permalink
Improve description of duration argument
Browse files Browse the repository at this point in the history
  • Loading branch information
pleshakov committed Oct 20, 2023
1 parent 7d57948 commit 45789b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/gateway/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ func createSleepCommand() *cobra.Command {
&duration,
durationFlag,
30*time.Second,
"Set the duration of sleep",
"Set the duration of sleep. Must be parsable by https://pkg.go.dev/time#ParseDuration",
)

return cmd
Expand Down
9 changes: 6 additions & 3 deletions docs/cli-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ Usage:
gateway sleep [flags]
```

| Name | Type | Description |
|----------|------------|-------------------------------------------|
| duration | `duration` | Set the duration of sleep (default `30s`) |
| Name | Type | Description |
|----------|-----------------|-------------------------------------------------------------------------------------------------------|
| duration | `time.Duration` | Set the duration of sleep. Must be parsable by [`time.ParseDuration`][parseDuration]. (default `30s`) |


[parseDuration]:https://pkg.go.dev/time#ParseDuration

0 comments on commit 45789b0

Please sign in to comment.