Skip to content

Commit

Permalink
reference/functions: correct carg duration min max (#56)
Browse files Browse the repository at this point in the history
* reference/functions: correct carg duration min max

Signed-off-by: SoggySaussages <[email protected]>

* reference/functions: remove nanosecond note

Signed-off-by: SoggySaussages <[email protected]>

* learn/beginner: correct carg duration validation

Signed-off-by: SoggySaussages <[email protected]>

---------

Signed-off-by: SoggySaussages <[email protected]>
  • Loading branch information
SoggySaussages authored Nov 22, 2024
1 parent d3ac208 commit c440e03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion content/docs/reference/templates/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2291,7 +2291,7 @@ An argument's `"type"` must be one of the following:
duration)

Additionally, the `int`, `float`, and `duration` type support validation ranges in the interval `(min, max)`, where for
`duration` it is in seconds.
`duration` it is in [time.Duration format](/docs/reference/templates/syntax-and-data#time) values.

##### Example

Expand Down
2 changes: 1 addition & 1 deletion content/learn/beginner/command-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Following types support these validation ranges:

- `int`
- `float`
- `duration` (in seconds)
- `duration` (in [time.Duration format](/docs/reference/templates/syntax-and-data#time))

Make sure to use these instead of manually verifying a valid range, if possible, as it makes your code cleaner and
easier to read.
Expand Down

0 comments on commit c440e03

Please sign in to comment.