1
0
mirror of https://github.com/go-task/task.git synced 2025-11-23 22:24:45 +02:00

feat: add uuid and rand number functions (#2225)

* feat: add uuid and rand number functions

* chore: remove randFloat for now
This commit is contained in:
Pete Davison
2025-05-01 18:58:01 +01:00
committed by GitHub
parent f8736c5f77
commit 6528b36caa
4 changed files with 13 additions and 28 deletions

View File

@@ -399,6 +399,9 @@ Lastly, Task itself provides a few functions:
| `spew` | Returns the Go representation of a specific variable. Useful for debugging. Uses the [davecgh/go-spew](https://github.com/davecgh/go-spew) package. |
| `fromYaml`\* | Decodes a YAML string into an object. |
| `toYaml`\* | Encodes an object as a YAML string. |
| `uuid` | Generates a new pseudo-random UUIDv4 string. |
| `randInt` | Generates a new pseudo-random, non-negative, 32bit integer. Generated numbers are not suitable for security-sensitive work. |
| `randIntN` | Generates a new pseudo-random, non-negative, 32bit integer in the half-open interval `[0,n)`. Generated numbers are not suitable for security-sensitive work. |
{/* prettier-ignore-start */}
[text/template]: https://pkg.go.dev/text/template