-
Originally opened by @rawkode in cuelang/cue#898 I'm looking to add a The plan is to add a A I've noticed that if I I've also tried getting the I was assuming I could maybe
fmt.Println(fieldValue)
node := fieldsIterator.Value().Source()
switch v := node.(type) {
case *ast.Ident:
fmt.Println("IDENT", v.Name)
default:
fmt.Println("NODE", v) # Always get this, with label and value; only expecting value
}
switch fieldsIterator.Value().Kind() {
case cue.StringKind:
fmt.Println("STRING BITCHES")
case cue.IntKind:
fmt.Println("INT")
default:
fmt.Println(fieldValue.Kind())
} Am I using these incorrectly? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Original reply by @verdverm in cuelang/cue#898 (comment) Try |
Beta Was this translation helpful? Give feedback.
Original reply by @verdverm in cuelang/cue#898 (comment)
Try
IncompleteKind()
instead, this will return the underlying type for fields which are still incomplete.