Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

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

Answered by mpvl
zzxwill asked this question in General
Discussion options

You must be logged in to vote

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: 3 comments

Comment options

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

You must be logged in to vote
0 replies
Comment options

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
3 participants