Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Unified Diff: client/flagpb/unmarshal_test.pb_test.go

Issue 1940683002: client/flagpb: fix unmarshaling of maps (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@flagpb-parse-value
Patch Set: -mapcase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« client/flagpb/unmarshal.go ('K') | « client/flagpb/unmarshal_test.proto ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/flagpb/unmarshal_test.pb_test.go
diff --git a/client/flagpb/unmarshal_test.pb_test.go b/client/flagpb/unmarshal_test.pb_test.go
index c9cb28d2be73a657946d0b379f87e15a42fcaab1..477b29678f25f38f513884ffbbf71b45f7381188 100644
--- a/client/flagpb/unmarshal_test.pb_test.go
+++ b/client/flagpb/unmarshal_test.pb_test.go
@@ -12,6 +12,7 @@ It has these top-level messages:
M1
M2
M3
+ MapContainer
*/
package flagpb
@@ -107,28 +108,68 @@ func (m *M3) GetM2() *M2 {
return nil
}
+type MapContainer struct {
+ Ss map[string]string `protobuf:"bytes,1,rep,name=ss" json:"ss,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ Ii map[int32]int32 `protobuf:"bytes,2,rep,name=ii" json:"ii,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
+ Sm1 map[string]*M1 `protobuf:"bytes,3,rep,name=sm1" json:"sm1,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+}
+
+func (m *MapContainer) Reset() { *m = MapContainer{} }
+func (m *MapContainer) String() string { return proto.CompactTextString(m) }
+func (*MapContainer) ProtoMessage() {}
+func (*MapContainer) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
+
+func (m *MapContainer) GetSs() map[string]string {
+ if m != nil {
+ return m.Ss
+ }
+ return nil
+}
+
+func (m *MapContainer) GetIi() map[int32]int32 {
+ if m != nil {
+ return m.Ii
+ }
+ return nil
+}
+
+func (m *MapContainer) GetSm1() map[string]*M1 {
+ if m != nil {
+ return m.Sm1
+ }
+ return nil
+}
+
func init() {
proto.RegisterType((*M1)(nil), "flagpb.M1")
proto.RegisterType((*M2)(nil), "flagpb.M2")
proto.RegisterType((*M3)(nil), "flagpb.M3")
+ proto.RegisterType((*MapContainer)(nil), "flagpb.MapContainer")
proto.RegisterEnum("flagpb.E", E_name, E_value)
}
var fileDescriptor0 = []byte{
- // 227 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x90, 0x31, 0x4f, 0xc3, 0x30,
- 0x10, 0x85, 0x39, 0xbb, 0xb5, 0xda, 0xa3, 0xaa, 0x2a, 0x83, 0x84, 0xc5, 0x54, 0x65, 0x42, 0x0c,
- 0x11, 0x76, 0x27, 0x7e, 0x40, 0xc7, 0x2e, 0x1e, 0x18, 0x41, 0xb1, 0x14, 0x68, 0xa4, 0x84, 0x44,
- 0xb1, 0xf9, 0xff, 0x9c, 0x2f, 0x4a, 0xc4, 0xc0, 0xe4, 0x7b, 0xfe, 0xf4, 0xfc, 0xde, 0x19, 0xef,
- 0x7f, 0xbe, 0xbb, 0x6a, 0x8c, 0xd7, 0xaa, 0xfd, 0x48, 0x75, 0x4c, 0xe5, 0x30, 0xf6, 0xa9, 0xd7,
- 0xea, 0xb3, 0xad, 0xbe, 0x86, 0x50, 0xbc, 0xa3, 0xb8, 0x58, 0xbd, 0x43, 0x88, 0x06, 0x8e, 0xf0,
- 0xb4, 0xf5, 0x10, 0xb3, 0x6a, 0x8c, 0x20, 0xb5, 0xf6, 0xd0, 0xe8, 0x3d, 0x8a, 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, 0x09, 0xd4, 0x59,
+ 0xb5, 0xb2, 0x07, 0xf6, 0xbf, 0xfa, 0x49, 0x55, 0x6a, 0xa5, 0xf8, 0x15, 0x30, 0x8d, 0x1b, 0x31,
+ 0x27, 0x3f, 0x6b, 0x6f, 0xbe, 0x8a, 0x4b, 0xbd, 0x55, 0x8e, 0x6f, 0xe0, 0xb0, 0x4a, 0xe3, 0x43,
+ 0x60, 0x9f, 0xd9, 0xae, 0xba, 0x29, 0x5b, 0xf2, 0x11, 0x78, 0x5f, 0xe9, 0x72, 0x5b, 0x9e, 0x60,
+ 0x4f, 0x94, 0xe0, 0x9e, 0xde, 0x12, 0x6b, 0xab, 0x62, 0x9b, 0x36, 0xaf, 0xc5, 0xe6, 0x35, 0x6d,
+ 0x0f, 0xd0, 0xad, 0xe3, 0x5b, 0xe2, 0x26, 0x4d, 0xdf, 0xdf, 0x0b, 0xf9, 0xed, 0x71, 0x71, 0x0c,
+ 0x64, 0xc6, 0x7d, 0xa0, 0x2f, 0xd7, 0xc3, 0x03, 0xf7, 0x8d, 0x87, 0x44, 0xfa, 0xee, 0xe1, 0x4d,
+ 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xcf, 0xa0, 0xa7, 0xeb, 0x90, 0x02, 0x00, 0x00,
}
« client/flagpb/unmarshal.go ('K') | « client/flagpb/unmarshal_test.proto ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698