Skip to content
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

Open
jpluscplusm opened this issue Jul 16, 2024 · 3 comments
Open

docs/howto: Ensuring a list is a subset of another list #169

jpluscplusm opened this issue Jul 16, 2024 · 3 comments
Labels
good first issue Good for newcomers howto For content that in the "howto" diataxis quadrant

Comments

@jpluscplusm
Copy link
Collaborator

A Commented CUE guide that demonstrates this solution to the problem:

import "list"

allowed_values: ["a", "b", "c"]
my_values: [...or(allowed_values)]
my_values: ["a", "nope"]

Notes:

  • it's probably worth making sure the word "subset" appears in the page's prose
  • we can probably display one passing and one failing example in the same CUE, via cue eval -i
  • /docs/howto/ensure-list-is-subset-of-another-list feels like a suitable path
  • given this might only work 100% as expected with primitive values, it might be worth calling this out via a note and a link to proposal: allow all values to be compared for equality cue#2583
@jpluscplusm jpluscplusm added good first issue Good for newcomers howto For content that in the "howto" diataxis quadrant labels Jul 16, 2024
@jpluscplusm
Copy link
Collaborator Author

@sa-spag is going to give writing this guide a try 👍 🎉

@jpluscplusm
Copy link
Collaborator Author

@sa-spag Hey there 👋 Just a friendly check-in ... did you manage to get anywhere with writing this How-to Guide? :-)

@sa-spag
Copy link

sa-spag commented Aug 20, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers howto For content that in the "howto" diataxis quadrant
Projects
Status: In progress
Development

No branches or pull requests

2 participants