You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
Is your feature request related to a problem? Please describe.
I'd like to retrieve all the attributes for a value as a slice for further processing within my application. The current API does not allow this and requires knowing the key (https://pkg.go.dev/cuelang.org/[email protected]/cue#Value.Attribute). The same applies for retrieving the key/value pairs from an attribute, which is of more interest to extract actually. The POC returns the key/value pairs for an attribute as a Go map.
My users can specify a regex so I cannot know the keys beforehand and thus the need for extra processing.
@verdverm Very likely not. By doing so attributes would matter for evaluation. The whole purpose of attributes is that they are not part of the language.
The only thing imagine is that one could analyze CUE in the tooling layer, including getting attributes. But they should not influence regular evaluation.
Is your feature request related to a problem? Please describe.
I'd like to retrieve all the attributes for a value as a slice for further processing within my application. The current API does not allow this and requires knowing the key (https://pkg.go.dev/cuelang.org/[email protected]/cue#Value.Attribute). The same applies for retrieving the key/value pairs from an attribute, which is of more interest to extract actually. The POC returns the key/value pairs for an attribute as a Go map.
My users can specify a regex so I cannot know the keys beforehand and thus the need for extra processing.
Describe the solution you'd like
#529 is a POC
Describe alternatives you've considered
The API does not support this. I currently maintain a small patch to expose the above.
The text was updated successfully, but these errors were encountered: