...

Text file src/cuelang.org/go/tools/trim/testdata/kube1.txtar

Documentation: cuelang.org/go/tools/trim/testdata

     1-- in.cue --
     2service: [ID=string]: {
     3	ports: [...{
     4		protocol: *"TCP" | "UDP"
     5		extra:    3
     6	}]
     7}
     8
     9service: a: {
    10	ports: [{
    11		name:     "a"
    12		protocol: "TCP"
    13		key:      "bar"
    14	}]
    15}
    16
    17service: a: {
    18	ports: [{
    19		protocol: "TCP"
    20		key:      "bar"
    21	}]
    22}
    23
    24service: a: {
    25	ports: [{
    26		extra: 3
    27	}]
    28}
    29-- out/trim --
    30== in.cue
    31service: [ID=string]: {
    32	ports: [...{
    33		protocol: *"TCP" | "UDP"
    34		extra:    3
    35	}]
    36}
    37
    38service: a: {
    39	ports: [{
    40		name: "a"
    41		key:  "bar"
    42	}]
    43}
    44
    45service: a: {
    46	ports: [{
    47		key: "bar"
    48	}]
    49}
    50
    51service: a: {
    52	ports: [{
    53	}]
    54}

View as plain text