cuelang.org/go@v0.10.1/encoding/protobuf/textproto/testdata/decoder/map.txtar (about)

     1  -- map.cue --
     2  map: {[string]: int} @protobuf(1,map[string]int)
     3  
     4  implicit: [string]: string
     5  
     6  intMap: {[string]: int} @protobuf(1,map[int]int)
     7  -- input.textproto --
     8  map: {
     9      key: "foo"
    10      value: 2
    11  }
    12  map: {
    13      key: "bar"
    14      value: 3
    15  }
    16  
    17  implicit: {
    18      key: "foo"
    19      value: 2
    20  }
    21  implicit: {
    22      key: "bar"
    23      value: 3
    24  }
    25  
    26  intMap: {
    27      key:   100
    28      value: 2
    29  }
    30  intMap: {
    31      key:   102
    32      value: 3
    33  }
    34  
    35  -- out/decode --
    36  map: {
    37  	"foo": 2
    38  }
    39  map: {
    40  	"bar": 3
    41  }
    42  implicit: {}
    43  implicit: {}
    44  intMap: {
    45  	"100": 2
    46  }
    47  intMap: {
    48  	"102": 3
    49  }