Skip to content

Create UUID within cuefile ? #2164

Answered by myitcv
subramanian0331 asked this question in Q&A
Discussion options

You must be logged in to vote
exec cue eval -T x.cue

-- x.cue --
import "uuid"

i: int @tag(i, var=rand)
x: uuid.FromInt(i)

For more information please see cue help injection.

See also the notes a the top of https://pkg.go.dev/cuelang.org/[email protected]/pkg/uuid regarding the uuid package.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@subramanian0331
Comment options

@mvdan
Comment options

Answer selected by subramanian0331
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants