1
0
mirror of https://github.com/go-task/task.git synced 2025-11-25 22:32:55 +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

@@ -2,11 +2,13 @@ package templater
import (
"maps"
"math/rand/v2"
"path/filepath"
"runtime"
"strings"
"github.com/davecgh/go-spew/spew"
"github.com/google/uuid"
"gopkg.in/yaml.v3"
"mvdan.cc/sh/v3/shell"
"mvdan.cc/sh/v3/syntax"
@@ -38,6 +40,9 @@ func init() {
"mustFromYaml": mustFromYaml,
"toYaml": toYaml,
"mustToYaml": mustToYaml,
"uuid": uuid.New,
"randInt": rand.Int,
"randIntN": rand.IntN,
}
// aliases