News for hackers. Stuff that matters.
Re:Cue, an open-source data validation language by dqpb on Tuesday June 15, 2021 @12:37PM (#27517887)
I would do it like this:

test.cue:

    #Job: {
        command: string
        args: string
        cli: "\(command) \(args)"
    }

    #GoJob: #Job & {
        command: "go"
    }

    #GoJobV: #GoJob & {
        args: "-v ./..."
    }

    job: #GoJobV.cli
Results in:

  $ cue export test.cue 
  {
      "job": "go -v ./..."
  }

There are no comments on this comment yet.