cue: more conversions to new style templates
Change-Id: I5476eaf5fb2d6cc09fc9848d0dd711ddcb6c249c
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/3865
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/cmd/cue/cmd/get_go.go b/cmd/cue/cmd/get_go.go
index 6c0194d..03bb4df 100644
--- a/cmd/cue/cmd/get_go.go
+++ b/cmd/cue/cmd/get_go.go
@@ -910,7 +910,7 @@
if b, ok := x.Key().Underlying().(*types.Basic); !ok || b.Kind() != types.String {
panic(fmt.Sprintf("unsupported map key type %T", x.Key()))
}
- fmt.Fprintf(e.w, "{ <_>: ")
+ fmt.Fprintf(e.w, "{ [string]: ")
e.printType(x.Elem())
fmt.Fprintf(e.w, " }")
diff --git a/cmd/cue/cmd/testdata/pkg/cuelang.org/go/cmd/cue/cmd/testdata/code/go/pkg1/file1_go_gen.cue b/cmd/cue/cmd/testdata/pkg/cuelang.org/go/cmd/cue/cmd/testdata/code/go/pkg1/file1_go_gen.cue
index 7f1869f..653f748 100644
--- a/cmd/cue/cmd/testdata/pkg/cuelang.org/go/cmd/cue/cmd/testdata/code/go/pkg1/file1_go_gen.cue
+++ b/cmd/cue/cmd/testdata/pkg/cuelang.org/go/cmd/cue/cmd/testdata/code/go/pkg1/file1_go_gen.cue
@@ -25,7 +25,7 @@
// Time is mapped to CUE's internal type.
Time: time.Time
Barzer: p2.Barzer
- Map: {<_>: null | CustomJSON} @go(,map[string]*CustomJSON)
+ Map: {[string]: null | CustomJSON} @go(,map[string]*CustomJSON)
Slice1: [...int] @go(,[]int)
Slice2: [...] @go(,[]interface{})
Slice3: null | [...] @go(,*[]json.Unmarshaler)
diff --git a/cmd/cue/cmd/testdata/script/vet_expr.txt b/cmd/cue/cmd/testdata/script/vet_expr.txt
index dabbe47..31fbfb4 100644
--- a/cmd/cue/cmd/testdata/script/vet_expr.txt
+++ b/cmd/cue/cmd/testdata/script/vet_expr.txt
@@ -11,7 +11,7 @@
./data.yaml:20:7
-- vet.cue --
File :: {
- translations <_>: {
+ translations: [string]: {
lang: string
text: string
}
diff --git a/cmd/cue/cmd/testdata/script/vet_file.txt b/cmd/cue/cmd/testdata/script/vet_file.txt
index 672192b..e1b7ff9 100644
--- a/cmd/cue/cmd/testdata/script/vet_file.txt
+++ b/cmd/cue/cmd/testdata/script/vet_file.txt
@@ -3,13 +3,13 @@
-- expect-stderr --
translations.hello.lang: incomplete value (string):
- ./vet.cue:2:26
+ ./vet.cue:2:31
translations.hello.lang: conflicting values false and string (mismatched types bool and string):
./data.yaml:13:11
- ./vet.cue:2:26
+ ./vet.cue:2:31
-- vet.cue --
-translations: <_>: lang: string
+translations: [string]: lang: string
File :: {
translations: {...}
diff --git a/cue/resolve_test.go b/cue/resolve_test.go
index 4afa740..4f4d627 100644
--- a/cue/resolve_test.go
+++ b/cue/resolve_test.go
@@ -1250,19 +1250,19 @@
desc: "non-closed definition carries over closedness to enclosed template",
in: `
S :: {
- <_>: { a: int }
+ [string]: { a: int }
}
a: S & {
v: { b: int }
}
Q :: {
- <_>: { a: int } | { b: int }
+ [string]: { a: int } | { b: int }
}
b: Q & {
w: { c: int }
}
R :: {
- <_>: [{ a: int }, { b: int }]
+ [string]: [{ a: int }, { b: int }]
}
c: R & {
w: [{ d: int }, ...]
diff --git a/doc/tutorial/kubernetes/quick/pkg/k8s.io/api/apps/v1beta1/types_go_gen.cue b/doc/tutorial/kubernetes/quick/pkg/k8s.io/api/apps/v1beta1/types_go_gen.cue
index fd4c052..3300e82 100644
--- a/doc/tutorial/kubernetes/quick/pkg/k8s.io/api/apps/v1beta1/types_go_gen.cue
+++ b/doc/tutorial/kubernetes/quick/pkg/k8s.io/api/apps/v1beta1/types_go_gen.cue
@@ -29,7 +29,7 @@
// label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
// +optional
- selector?: {<_>: string} @go(Selector,map[string]string) @protobuf(2,bytes,rep)
+ selector?: {[string]: string} @go(Selector,map[string]string) @protobuf(2,bytes,rep)
// label selector for pods that should match the replicas count. This is a serializated
// version of both map-based and more expressive set-based selectors. This is done to
@@ -355,7 +355,7 @@
// The annotations to be updated to a deployment
// +optional
- updatedAnnotations?: {<_>: string} @go(UpdatedAnnotations,map[string]string) @protobuf(2,bytes,rep)
+ updatedAnnotations?: {[string]: string} @go(UpdatedAnnotations,map[string]string) @protobuf(2,bytes,rep)
// The config of this deployment rollback.
rollbackTo: RollbackConfig @go(RollbackTo) @protobuf(3,bytes,opt)
diff --git a/doc/tutorial/kubernetes/quick/pkg/k8s.io/api/core/v1/types_go_gen.cue b/doc/tutorial/kubernetes/quick/pkg/k8s.io/api/core/v1/types_go_gen.cue
index f9e8799..da9047c 100644
--- a/doc/tutorial/kubernetes/quick/pkg/k8s.io/api/core/v1/types_go_gen.cue
+++ b/doc/tutorial/kubernetes/quick/pkg/k8s.io/api/core/v1/types_go_gen.cue
@@ -1132,7 +1132,7 @@
// Optional: Extra command options if any.
// +optional
- options?: {<_>: string} @go(Options,map[string]string) @protobuf(5,bytes,rep)
+ options?: {[string]: string} @go(Options,map[string]string) @protobuf(5,bytes,rep)
}
// FlexVolume represents a generic volume resource that is
@@ -1162,7 +1162,7 @@
// Optional: Extra command options if any.
// +optional
- options?: {<_>: string} @go(Options,map[string]string) @protobuf(5,bytes,rep)
+ options?: {[string]: string} @go(Options,map[string]string) @protobuf(5,bytes,rep)
}
// Represents a Persistent Disk resource in AWS.
@@ -1903,7 +1903,7 @@
// Attributes of the volume to publish.
// +optional
- volumeAttributes?: {<_>: string} @go(VolumeAttributes,map[string]string) @protobuf(5,bytes,rep)
+ volumeAttributes?: {[string]: string} @go(VolumeAttributes,map[string]string) @protobuf(5,bytes,rep)
// ControllerPublishSecretRef is a reference to the secret object containing
// sensitive information to pass to the CSI driver to complete the CSI
@@ -1959,7 +1959,7 @@
// VolumeAttributes stores driver-specific properties that are passed to the CSI
// driver. Consult your driver's documentation for supported values.
// +optional
- volumeAttributes?: {<_>: string} @go(VolumeAttributes,map[string]string) @protobuf(4,bytes,rep)
+ volumeAttributes?: {[string]: string} @go(VolumeAttributes,map[string]string) @protobuf(4,bytes,rep)
// NodePublishSecretRef is a reference to the secret object containing
// sensitive information to pass to the CSI driver to complete the CSI
@@ -3244,7 +3244,7 @@
// Selector which must match a node's labels for the pod to be scheduled on that node.
// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
// +optional
- nodeSelector?: {<_>: string} @go(NodeSelector,map[string]string) @protobuf(7,bytes,rep)
+ nodeSelector?: {[string]: string} @go(NodeSelector,map[string]string) @protobuf(7,bytes,rep)
// ServiceAccountName is the name of the ServiceAccount to use to run this pod.
// More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
@@ -4006,7 +4006,7 @@
// controller, if empty defaulted to labels on Pod template.
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
// +optional
- selector?: {<_>: string} @go(Selector,map[string]string) @protobuf(2,bytes,rep)
+ selector?: {[string]: string} @go(Selector,map[string]string) @protobuf(2,bytes,rep)
// Template is the object that describes the pod that will be created if
// insufficient replicas are detected. This takes precedence over a TemplateRef.
@@ -4247,7 +4247,7 @@
// Ignored if type is ExternalName.
// More info: https://kubernetes.io/docs/concepts/services-networking/service/
// +optional
- selector?: {<_>: string} @go(Selector,map[string]string) @protobuf(2,bytes,rep)
+ selector?: {[string]: string} @go(Selector,map[string]string) @protobuf(2,bytes,rep)
// clusterIP is the IP address of the service and is usually assigned
// randomly by the master. If an address is specified manually and is not in
@@ -5020,7 +5020,7 @@
ResourceAttachableVolumesPrefix :: "attachable-volumes-"
// ResourceList is a set of (resource name, quantity) pairs.
-ResourceList :: {<_>: resource.Quantity}
+ResourceList :: {[string]: resource.Quantity}
// Node is a worker node in Kubernetes.
// Each node will have a unique identifier in the cache (i.e. in etcd).
@@ -5871,7 +5871,7 @@
// base64 encoded string, representing the arbitrary (possibly non-string)
// data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
// +optional
- data?: {<_>: bytes} @go(Data,map[string][]byte) @protobuf(2,bytes,rep)
+ data?: {[string]: bytes} @go(Data,map[string][]byte) @protobuf(2,bytes,rep)
// stringData allows specifying non-binary secret data in string form.
// It is provided as a write-only convenience method.
@@ -5879,7 +5879,7 @@
// It is never output when reading from the API.
// +k8s:conversion-gen=false
// +optional
- stringData?: {<_>: string} @go(StringData,map[string]string) @protobuf(4,bytes,rep)
+ stringData?: {[string]: string} @go(StringData,map[string]string) @protobuf(4,bytes,rep)
// Used to facilitate programmatic handling of secret data.
// +optional
@@ -6019,7 +6019,7 @@
// The keys stored in Data must not overlap with the keys in
// the BinaryData field, this is enforced during validation process.
// +optional
- data?: {<_>: string} @go(Data,map[string]string) @protobuf(2,bytes,rep)
+ data?: {[string]: string} @go(Data,map[string]string) @protobuf(2,bytes,rep)
// BinaryData contains the binary data.
// Each key must consist of alphanumeric characters, '-', '_' or '.'.
@@ -6029,7 +6029,7 @@
// Using this field will require 1.10+ apiserver and
// kubelet.
// +optional
- binaryData?: {<_>: bytes} @go(BinaryData,map[string][]byte) @protobuf(3,bytes,rep)
+ binaryData?: {[string]: bytes} @go(BinaryData,map[string][]byte) @protobuf(3,bytes,rep)
}
// ConfigMapList is a resource containing a list of ConfigMap objects.
diff --git a/doc/tutorial/kubernetes/quick/pkg/k8s.io/api/extensions/v1beta1/types_go_gen.cue b/doc/tutorial/kubernetes/quick/pkg/k8s.io/api/extensions/v1beta1/types_go_gen.cue
index 71be27c..0e1b5a3 100644
--- a/doc/tutorial/kubernetes/quick/pkg/k8s.io/api/extensions/v1beta1/types_go_gen.cue
+++ b/doc/tutorial/kubernetes/quick/pkg/k8s.io/api/extensions/v1beta1/types_go_gen.cue
@@ -24,7 +24,7 @@
// label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
// +optional
- selector?: {<_>: string} @go(Selector,map[string]string) @protobuf(2,bytes,rep)
+ selector?: {[string]: string} @go(Selector,map[string]string) @protobuf(2,bytes,rep)
// label selector for pods that should match the replicas count. This is a serializated
// version of both map-based and more expressive set-based selectors. This is done to
@@ -140,7 +140,7 @@
// The annotations to be updated to a deployment
// +optional
- updatedAnnotations?: {<_>: string} @go(UpdatedAnnotations,map[string]string) @protobuf(2,bytes,rep)
+ updatedAnnotations?: {[string]: string} @go(UpdatedAnnotations,map[string]string) @protobuf(2,bytes,rep)
// The config of this deployment rollback.
rollbackTo: RollbackConfig @go(RollbackTo) @protobuf(3,bytes,opt)
diff --git a/doc/tutorial/kubernetes/quick/pkg/k8s.io/apimachinery/pkg/apis/meta/v1/types_go_gen.cue b/doc/tutorial/kubernetes/quick/pkg/k8s.io/apimachinery/pkg/apis/meta/v1/types_go_gen.cue
index 9881cfa..9632b2b 100644
--- a/doc/tutorial/kubernetes/quick/pkg/k8s.io/apimachinery/pkg/apis/meta/v1/types_go_gen.cue
+++ b/doc/tutorial/kubernetes/quick/pkg/k8s.io/apimachinery/pkg/apis/meta/v1/types_go_gen.cue
@@ -210,14 +210,14 @@
// and services.
// More info: http://kubernetes.io/docs/user-guide/labels
// +optional
- labels?: {<_>: string} @go(Labels,map[string]string) @protobuf(11,bytes,rep)
+ labels?: {[string]: string} @go(Labels,map[string]string) @protobuf(11,bytes,rep)
// Annotations is an unstructured key value map stored with a resource that may be
// set by external tools to store and retrieve arbitrary metadata. They are not
// queryable and should be preserved when modifying objects.
// More info: http://kubernetes.io/docs/user-guide/annotations
// +optional
- annotations?: {<_>: string} @go(Annotations,map[string]string) @protobuf(12,bytes,rep)
+ annotations?: {[string]: string} @go(Annotations,map[string]string) @protobuf(12,bytes,rep)
// List of objects depended by this object. If ALL objects in the list have
// been deleted, this object will be garbage collected. If this object is managed by a controller,
@@ -1065,7 +1065,7 @@
// map is equivalent to an element of matchExpressions, whose key field is "key", the
// operator is "In", and the values array contains only "value". The requirements are ANDed.
// +optional
- matchLabels?: {<_>: string} @go(MatchLabels,map[string]string) @protobuf(1,bytes,rep)
+ matchLabels?: {[string]: string} @go(MatchLabels,map[string]string) @protobuf(1,bytes,rep)
// matchExpressions is a list of label selector requirements. The requirements are ANDed.
// +optional
diff --git a/encoding/openapi/testdata/structural.cue b/encoding/openapi/testdata/structural.cue
index f1bb1c6..099fad7 100644
--- a/encoding/openapi/testdata/structural.cue
+++ b/encoding/openapi/testdata/structural.cue
@@ -3,7 +3,7 @@
Attributes: {
// A map of attribute name to its value.
attributes: {
- <_>: AttrValue
+ [string]: AttrValue
}
}
@@ -39,6 +39,6 @@
Attributes_StringMap: {
// Holds a set of name/value pairs.
entries: {
- <_>: string
+ [string]: string
} @protobuf(1,type=map<string,string>)
}
diff --git a/encoding/protobuf/examples_test.go b/encoding/protobuf/examples_test.go
index 7ce0ffa..5d7a7c8 100644
--- a/encoding/protobuf/examples_test.go
+++ b/encoding/protobuf/examples_test.go
@@ -53,7 +53,7 @@
// method?: [...string] @protobuf(2)
// method?: [...=~"^[A-Z]"]
// exmapleMap?: {
- // <_>: string
+ // [string]: string
// } @protobuf(3,type=map<string,string>,exmaple_map)
// }
}
diff --git a/encoding/protobuf/parse.go b/encoding/protobuf/parse.go
index e70601c..917f7fd 100644
--- a/encoding/protobuf/parse.go
+++ b/encoding/protobuf/parse.go
@@ -519,7 +519,7 @@
// All keys are converted to strings.
// TODO: support integer keys.
- f.Label = &ast.TemplateLabel{Ident: ast.NewIdent("_")}
+ f.Label = ast.NewList(ast.NewIdent("string"))
f.Value = p.toExpr(x.Position, p.resolve(x.Position, x.Type, x.Options))
name := p.ident(x.Position, x.Name)
diff --git a/encoding/protobuf/testdata/attributes.proto.out.cue b/encoding/protobuf/testdata/attributes.proto.out.cue
index 936a6db..319e791 100644
--- a/encoding/protobuf/testdata/attributes.proto.out.cue
+++ b/encoding/protobuf/testdata/attributes.proto.out.cue
@@ -49,7 +49,7 @@
Attributes: {
// A map of attribute name to its value.
attributes?: {
- <_>: Attributes_AttributeValue
+ [string]: Attributes_AttributeValue
} @protobuf(1,type=map<string,AttributeValue>)
}
@@ -91,7 +91,7 @@
Attributes_StringMap: {
// Holds a set of name/value pairs.
entries?: {
- <_>: string
+ [string]: string
} @protobuf(1,type=map<string,string>)
}
@@ -108,42 +108,42 @@
// Holds attributes of type STRING, DNS_NAME, EMAIL_ADDRESS, URI
strings?: {
- <_>: int32
+ [string]: int32
} @protobuf(2,type=map<sint32,sint32>)
// Holds attributes of type INT64
int64s?: {
- <_>: int64
+ [string]: int64
} @protobuf(3,type=map<sint32,int64>)
// Holds attributes of type DOUBLE
doubles?: {
- <_>: float64
+ [string]: float64
} @protobuf(4,type=map<sint32,double>)
// Holds attributes of type BOOL
bools?: {
- <_>: bool
+ [string]: bool
} @protobuf(5,type=map<sint32,bool>)
// Holds attributes of type TIMESTAMP
time?: {
- <_>: _time_.Time
+ [string]: _time_.Time
} @protobuf(6,type=map<sint32,google.protobuf.Timestamp>,"(gogoproto.nullable)=false","(gogoproto.stdtime)")
// Holds attributes of type DURATION
durations?: {
- <_>: _time_.Duration
+ [string]: _time_.Duration
} @protobuf(7,type=map<sint32,google.protobuf.Duration>,"(gogoproto.nullable)=false","(gogoproto.stdduration)")
// Holds attributes of type BYTES
bytes?: {
- <_>: _bytes_
+ [string]: _bytes_
} @protobuf(8,type=map<sint32,bytes>)
// Holds attributes of type STRING_MAP
stringMaps?: {
- <_>: StringMap
+ [string]: StringMap
} @protobuf(9,type=map<sint32,StringMap>,string_maps,"(gogoproto.nullable)=false")
}
_time_ = time
@@ -154,6 +154,6 @@
StringMap: {
// Holds a set of name/value pairs.
entries?: {
- <_>: int32
+ [string]: int32
} @protobuf(1,type=map<sint32,sint32>)
}
diff --git a/encoding/protobuf/testdata/client_config.proto.out.cue b/encoding/protobuf/testdata/client_config.proto.out.cue
index b9c5c3a..c9088ed 100644
--- a/encoding/protobuf/testdata/client_config.proto.out.cue
+++ b/encoding/protobuf/testdata/client_config.proto.out.cue
@@ -144,7 +144,7 @@
// is used to support per-service configuration for cases where a
// mixerclient serves multiple services.
serviceConfigs?: {
- <_>: ServiceConfig
+ [string]: ServiceConfig
} @protobuf(2,type=map<string,ServiceConfig>,service_configs)
// Default destination service name if none was specified in the
diff --git a/encoding/protobuf/testdata/gateway.proto.out.cue b/encoding/protobuf/testdata/gateway.proto.out.cue
index 1a7ed21..82b141b 100644
--- a/encoding/protobuf/testdata/gateway.proto.out.cue
+++ b/encoding/protobuf/testdata/gateway.proto.out.cue
@@ -214,7 +214,7 @@
// the resource is present. In other words, the Gateway resource must
// reside in the same namespace as the gateway workload instance.
selector?: {
- <_>: string
+ [string]: string
} @protobuf(2,type=map<string,string>)
selector?: <name>: name
}
diff --git a/encoding/protobuf/testdata/istio.io/api/mixer/v1/attributes_proto_gen.cue b/encoding/protobuf/testdata/istio.io/api/mixer/v1/attributes_proto_gen.cue
index 27260d7..0918e35 100644
--- a/encoding/protobuf/testdata/istio.io/api/mixer/v1/attributes_proto_gen.cue
+++ b/encoding/protobuf/testdata/istio.io/api/mixer/v1/attributes_proto_gen.cue
@@ -49,7 +49,7 @@
Attributes: {
// A map of attribute name to its value.
attributes?: {
- <_>: Attributes_AttributeValue
+ [string]: Attributes_AttributeValue
} @protobuf(1,type=map<string,AttributeValue>)
}
@@ -91,7 +91,7 @@
Attributes_StringMap: {
// Holds a set of name/value pairs.
entries?: {
- <_>: string
+ [string]: string
} @protobuf(1,type=map<string,string>)
}
@@ -108,42 +108,42 @@
// Holds attributes of type STRING, DNS_NAME, EMAIL_ADDRESS, URI
strings?: {
- <_>: int32
+ [string]: int32
} @protobuf(2,type=map<sint32,sint32>)
// Holds attributes of type INT64
int64s?: {
- <_>: int64
+ [string]: int64
} @protobuf(3,type=map<sint32,int64>)
// Holds attributes of type DOUBLE
doubles?: {
- <_>: float64
+ [string]: float64
} @protobuf(4,type=map<sint32,double>)
// Holds attributes of type BOOL
bools?: {
- <_>: bool
+ [string]: bool
} @protobuf(5,type=map<sint32,bool>)
// Holds attributes of type TIMESTAMP
time?: {
- <_>: _time_.Time
+ [string]: _time_.Time
} @protobuf(6,type=map<sint32,google.protobuf.Timestamp>,"(gogoproto.nullable)=false","(gogoproto.stdtime)")
// Holds attributes of type DURATION
durations?: {
- <_>: _time_.Duration
+ [string]: _time_.Duration
} @protobuf(7,type=map<sint32,google.protobuf.Duration>,"(gogoproto.nullable)=false","(gogoproto.stdduration)")
// Holds attributes of type BYTES
bytes?: {
- <_>: _bytes_
+ [string]: _bytes_
} @protobuf(8,type=map<sint32,bytes>)
// Holds attributes of type STRING_MAP
stringMaps?: {
- <_>: StringMap
+ [string]: StringMap
} @protobuf(9,type=map<sint32,StringMap>,string_maps,"(gogoproto.nullable)=false")
}
_time_ = time
@@ -154,6 +154,6 @@
StringMap: {
// Holds a set of name/value pairs.
entries?: {
- <_>: int32
+ [string]: int32
} @protobuf(1,type=map<sint32,sint32>)
}
diff --git a/encoding/protobuf/testdata/istio.io/api/mixer/v1/config/client/client_config_proto_gen.cue b/encoding/protobuf/testdata/istio.io/api/mixer/v1/config/client/client_config_proto_gen.cue
index 4762234..0a561d6 100644
--- a/encoding/protobuf/testdata/istio.io/api/mixer/v1/config/client/client_config_proto_gen.cue
+++ b/encoding/protobuf/testdata/istio.io/api/mixer/v1/config/client/client_config_proto_gen.cue
@@ -143,7 +143,7 @@
// is used to support per-service configuration for cases where a
// mixerclient serves multiple services.
serviceConfigs?: {
- <_>: ServiceConfig
+ [string]: ServiceConfig
} @protobuf(2,type=map<string,ServiceConfig>,service_configs)
// Default destination service name if none was specified in the
diff --git a/encoding/protobuf/testdata/istio.io/api/mixer/v1/config/client/quota_proto_gen.cue b/encoding/protobuf/testdata/istio.io/api/mixer/v1/config/client/quota_proto_gen.cue
index d94fe8e..c0203a6 100644
--- a/encoding/protobuf/testdata/istio.io/api/mixer/v1/config/client/quota_proto_gen.cue
+++ b/encoding/protobuf/testdata/istio.io/api/mixer/v1/config/client/quota_proto_gen.cue
@@ -98,7 +98,7 @@
// request.http_method:
// exact: POST
clause?: {
- <_>: StringMatch
+ [string]: StringMatch
} @protobuf(1,type=map<string,StringMatch>)
}
diff --git a/encoding/protobuf/testdata/istio.io/api/mixer/v1/config/client/service_proto_gen.cue b/encoding/protobuf/testdata/istio.io/api/mixer/v1/config/client/service_proto_gen.cue
index 1940810..d597c18 100644
--- a/encoding/protobuf/testdata/istio.io/api/mixer/v1/config/client/service_proto_gen.cue
+++ b/encoding/protobuf/testdata/istio.io/api/mixer/v1/config/client/service_proto_gen.cue
@@ -43,6 +43,6 @@
// *Note:* When used for a VirtualService destination, labels MUST be empty.
//
labels?: {
- <_>: string
+ [string]: string
} @protobuf(5,type=map<string,string>)
}
diff --git a/encoding/protobuf/testdata/istio.io/api/mixer/v1/mixer_proto_gen.cue b/encoding/protobuf/testdata/istio.io/api/mixer/v1/mixer_proto_gen.cue
index b69bf68..d67f638 100644
--- a/encoding/protobuf/testdata/istio.io/api/mixer/v1/mixer_proto_gen.cue
+++ b/encoding/protobuf/testdata/istio.io/api/mixer/v1/mixer_proto_gen.cue
@@ -40,7 +40,7 @@
// The individual quotas to allocate
quotas?: {
- <_>: CheckRequest_QuotaParams
+ [string]: CheckRequest_QuotaParams
} @protobuf(4,type=map<string,QuotaParams>,"(gogoproto.nullable)=false")
}
@@ -60,7 +60,7 @@
// The resulting quota, one entry per requested quota.
quotas?: {
- <_>: CheckResponse_QuotaResult
+ [string]: CheckResponse_QuotaResult
} @protobuf(3,type=map<string,QuotaResult>,"(gogoproto.nullable)=false")
}
diff --git a/encoding/protobuf/testdata/istio.io/api/networking/v1alpha3/gateway_proto_gen.cue b/encoding/protobuf/testdata/istio.io/api/networking/v1alpha3/gateway_proto_gen.cue
index dd88b3e..1d301da 100644
--- a/encoding/protobuf/testdata/istio.io/api/networking/v1alpha3/gateway_proto_gen.cue
+++ b/encoding/protobuf/testdata/istio.io/api/networking/v1alpha3/gateway_proto_gen.cue
@@ -213,7 +213,7 @@
// the resource is present. In other words, the Gateway resource must
// reside in the same namespace as the gateway workload instance.
selector?: {
- <_>: string
+ [string]: string
} @protobuf(2,type=map<string,string>)
selector?: {<name>: name}
}