-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs/howto: Ensuring a list is a subset of another list #169
Comments
@sa-spag is going to give writing this guide a try 👍 🎉 |
@sa-spag Hey there 👋 Just a friendly check-in ... did you manage to get anywhere with writing this How-to Guide? :-) |
👋 I had other priorities, but it is still in my backlog. |
That code is certainly more concise than what I ended up trying, though it gives error messages like:
This failure reporting is a bit verbose and could be a bit confusing to newcomers. It the meantime this is definitely helpful. Long term, matchN could perhaps provide better error reporting. The must/constrain proposal could also provide this if we had something like a
|
Yes, using allowed_values: ["a", "b", "c"]
my_values: ["a", "nope"]
my_values: matchN(1, allowed_values)
For the moment I'm going to defer to other folks about the relative suitability and appropriateness of either approach, specifically in the limited context of the guide this issue is tracking. |
A Commented CUE guide that demonstrates this solution to the problem:
Notes:
cue eval -i
/docs/howto/ensure-list-is-subset-of-another-list
feels like a suitable pathThe text was updated successfully, but these errors were encountered: