cuelang.org/go@v0.10.1/cue/testdata/export/017.txtar (about)

     1  # DO NOT EDIT; generated by go run testdata/gen.go
     2  #
     3  raw: true
     4  -- in.cue --
     5  {a: [1, 2], b: {for k, v in a if v > 1 {"\(k)": v}}}
     6  -- out/def --
     7  a: [1, 2]
     8  b: {
     9  	"1": 2
    10  }
    11  -- out/export --
    12  a: [1, 2]
    13  b: {
    14  	"1": 2
    15  }
    16  -- out/yaml --
    17  a:
    18  - 1
    19  - 2
    20  b:
    21    "1": 2
    22  -- out/json --
    23  {"a":[1,2],"b":{"1":2}}
    24  -- out/compile --
    25  --- in.cue
    26  {
    27    {
    28      a: [
    29        1,
    30        2,
    31      ]
    32      b: {
    33        for k, v in 〈1;a〉 if (〈0;v〉 > 1) {
    34          "\(〈1;k〉)": 〈1;v〉
    35        }
    36      }
    37    }
    38  }
    39  -- out/eval/stats --
    40  Leaks:  0
    41  Freed:  6
    42  Reused: 3
    43  Allocs: 3
    44  Retain: 0
    45  
    46  Unifications: 6
    47  Conjuncts:    9
    48  Disjuncts:    6
    49  -- out/eval --
    50  (struct){
    51    a: (#list){
    52      0: (int){ 1 }
    53      1: (int){ 2 }
    54    }
    55    b: (struct){
    56      "1": (int){ 2 }
    57    }
    58  }