Skip to content

How to get elements of a ListKind variable's value? #600

Answered by cueckoo
cueckoo asked this question in General
Discussion options

You must be logged in to vote

Original reply by @mpvl in cuelang/cue#600 (comment)

In CUE, currently the only way to get these values are doing something like:

cmd: [...string]

type: (cmd & [_])[0]

Which results in string for type

In the API you can use Value.Elem() to get the same.

Replies: 2 comments

Comment options

cueckoo
Jul 3, 2021
Collaborator Author

You must be logged in to vote
0 replies
Answer selected by cueckoo
Comment options

cueckoo
Jul 3, 2021
Collaborator Author

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant