Skip to content
Discussion options

You must be logged in to vote

I actually ended up with a structure that doesn't use lists anyway:

#ServiceStatus: "install" | "upgrade" | *"disabled"
services: [string]: #ServiceStatus
services: myservice: #ServiceStatus @tag(myservice)

if services.myservice != "disabled" {
  myservice: enabled: true
}
if services.myservice == "install" {
  myservice: install: true
}
if services.myservice == "upgrade" {
  myservice: upgrade: true
}
cue eval -t myservice=install
cue eval -t myservice=upgrade

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@richardpeng
Comment options

@richardpeng
Comment options

Answer selected by myitcv
@myitcv
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants