1
2
3
4 package issue503
5
6 import (
7 bytes "bytes"
8 fmt "fmt"
9 _ "github.com/gogo/protobuf/gogoproto"
10 proto "github.com/gogo/protobuf/proto"
11 io "io"
12 math "math"
13 math_bits "math/bits"
14 )
15
16
17 var _ = proto.Marshal
18 var _ = fmt.Errorf
19 var _ = math.Inf
20
21
22
23
24
25 const _ = proto.GoGoProtoPackageIsVersion3
26
27 type Foo struct {
28 Num1 []int64 `protobuf:"varint,1,rep,packed,name=num1,proto3" json:"num1,omitempty"`
29 Num2 []int32 `protobuf:"varint,2,rep,packed,name=num2,proto3" json:"num2,omitempty"`
30 Str1 []string `protobuf:"bytes,3,rep,name=str1,proto3" json:"str1,omitempty"`
31 Dat1 [][]byte `protobuf:"bytes,4,rep,name=dat1,proto3" json:"dat1,omitempty"`
32 XXX_NoUnkeyedLiteral struct{} `json:"-"`
33 XXX_unrecognized []byte `json:"-"`
34 XXX_sizecache int32 `json:"-"`
35 }
36
37 func (m *Foo) Reset() { *m = Foo{} }
38 func (m *Foo) String() string { return proto.CompactTextString(m) }
39 func (*Foo) ProtoMessage() {}
40 func (*Foo) Descriptor() ([]byte, []int) {
41 return fileDescriptor_8886d01c7a4b3fa8, []int{0}
42 }
43 func (m *Foo) XXX_Unmarshal(b []byte) error {
44 return m.Unmarshal(b)
45 }
46 func (m *Foo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
47 if deterministic {
48 return xxx_messageInfo_Foo.Marshal(b, m, deterministic)
49 } else {
50 b = b[:cap(b)]
51 n, err := m.MarshalToSizedBuffer(b)
52 if err != nil {
53 return nil, err
54 }
55 return b[:n], nil
56 }
57 }
58 func (m *Foo) XXX_Merge(src proto.Message) {
59 xxx_messageInfo_Foo.Merge(m, src)
60 }
61 func (m *Foo) XXX_Size() int {
62 return m.Size()
63 }
64 func (m *Foo) XXX_DiscardUnknown() {
65 xxx_messageInfo_Foo.DiscardUnknown(m)
66 }
67
68 var xxx_messageInfo_Foo proto.InternalMessageInfo
69
70 func (m *Foo) GetNum1() []int64 {
71 if m != nil {
72 return m.Num1
73 }
74 return nil
75 }
76
77 func (m *Foo) GetNum2() []int32 {
78 if m != nil {
79 return m.Num2
80 }
81 return nil
82 }
83
84 func (m *Foo) GetStr1() []string {
85 if m != nil {
86 return m.Str1
87 }
88 return nil
89 }
90
91 func (m *Foo) GetDat1() [][]byte {
92 if m != nil {
93 return m.Dat1
94 }
95 return nil
96 }
97
98 func init() {
99 proto.RegisterType((*Foo)(nil), "issue503.Foo")
100 }
101
102 func init() { proto.RegisterFile("issue503.proto", fileDescriptor_8886d01c7a4b3fa8) }
103
104 var fileDescriptor_8886d01c7a4b3fa8 = []byte{
105
106 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e,
107 0x4d, 0x35, 0x35, 0x30, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74,
108 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5,
109 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x0a, 0xe5, 0x62,
110 0x76, 0xcb, 0xcf, 0x17, 0x12, 0xe2, 0x62, 0xc9, 0x2b, 0xcd, 0x35, 0x94, 0x60, 0x54, 0x60, 0xd6,
111 0x60, 0x0e, 0x02, 0xb3, 0xa1, 0x62, 0x46, 0x12, 0x4c, 0x0a, 0xcc, 0x1a, 0xac, 0x60, 0x31, 0x23,
112 0x90, 0x58, 0x71, 0x49, 0x91, 0xa1, 0x04, 0xb3, 0x02, 0xb3, 0x06, 0x67, 0x10, 0x98, 0x0d, 0x12,
113 0x4b, 0x49, 0x2c, 0x31, 0x94, 0x60, 0x51, 0x60, 0xd6, 0xe0, 0x09, 0x02, 0xb3, 0x9d, 0x24, 0x1e,
114 0x3c, 0x94, 0x63, 0xfc, 0xf1, 0x50, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18,
115 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x31, 0x89, 0x0d, 0x6c, 0xaf, 0x31, 0x20, 0x00,
116 0x00, 0xff, 0xff, 0xe2, 0xf0, 0x54, 0xb4, 0xc2, 0x00, 0x00, 0x00,
117 }
118
119 func (this *Foo) VerboseEqual(that interface{}) error {
120 if that == nil {
121 if this == nil {
122 return nil
123 }
124 return fmt.Errorf("that == nil && this != nil")
125 }
126
127 that1, ok := that.(*Foo)
128 if !ok {
129 that2, ok := that.(Foo)
130 if ok {
131 that1 = &that2
132 } else {
133 return fmt.Errorf("that is not of type *Foo")
134 }
135 }
136 if that1 == nil {
137 if this == nil {
138 return nil
139 }
140 return fmt.Errorf("that is type *Foo but is nil && this != nil")
141 } else if this == nil {
142 return fmt.Errorf("that is type *Foo but is not nil && this == nil")
143 }
144 if len(this.Num1) != len(that1.Num1) {
145 return fmt.Errorf("Num1 this(%v) Not Equal that(%v)", len(this.Num1), len(that1.Num1))
146 }
147 for i := range this.Num1 {
148 if this.Num1[i] != that1.Num1[i] {
149 return fmt.Errorf("Num1 this[%v](%v) Not Equal that[%v](%v)", i, this.Num1[i], i, that1.Num1[i])
150 }
151 }
152 if len(this.Num2) != len(that1.Num2) {
153 return fmt.Errorf("Num2 this(%v) Not Equal that(%v)", len(this.Num2), len(that1.Num2))
154 }
155 for i := range this.Num2 {
156 if this.Num2[i] != that1.Num2[i] {
157 return fmt.Errorf("Num2 this[%v](%v) Not Equal that[%v](%v)", i, this.Num2[i], i, that1.Num2[i])
158 }
159 }
160 if len(this.Str1) != len(that1.Str1) {
161 return fmt.Errorf("Str1 this(%v) Not Equal that(%v)", len(this.Str1), len(that1.Str1))
162 }
163 for i := range this.Str1 {
164 if this.Str1[i] != that1.Str1[i] {
165 return fmt.Errorf("Str1 this[%v](%v) Not Equal that[%v](%v)", i, this.Str1[i], i, that1.Str1[i])
166 }
167 }
168 if len(this.Dat1) != len(that1.Dat1) {
169 return fmt.Errorf("Dat1 this(%v) Not Equal that(%v)", len(this.Dat1), len(that1.Dat1))
170 }
171 for i := range this.Dat1 {
172 if !bytes.Equal(this.Dat1[i], that1.Dat1[i]) {
173 return fmt.Errorf("Dat1 this[%v](%v) Not Equal that[%v](%v)", i, this.Dat1[i], i, that1.Dat1[i])
174 }
175 }
176 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
177 return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
178 }
179 return nil
180 }
181 func (this *Foo) Equal(that interface{}) bool {
182 if that == nil {
183 return this == nil
184 }
185
186 that1, ok := that.(*Foo)
187 if !ok {
188 that2, ok := that.(Foo)
189 if ok {
190 that1 = &that2
191 } else {
192 return false
193 }
194 }
195 if that1 == nil {
196 return this == nil
197 } else if this == nil {
198 return false
199 }
200 if len(this.Num1) != len(that1.Num1) {
201 return false
202 }
203 for i := range this.Num1 {
204 if this.Num1[i] != that1.Num1[i] {
205 return false
206 }
207 }
208 if len(this.Num2) != len(that1.Num2) {
209 return false
210 }
211 for i := range this.Num2 {
212 if this.Num2[i] != that1.Num2[i] {
213 return false
214 }
215 }
216 if len(this.Str1) != len(that1.Str1) {
217 return false
218 }
219 for i := range this.Str1 {
220 if this.Str1[i] != that1.Str1[i] {
221 return false
222 }
223 }
224 if len(this.Dat1) != len(that1.Dat1) {
225 return false
226 }
227 for i := range this.Dat1 {
228 if !bytes.Equal(this.Dat1[i], that1.Dat1[i]) {
229 return false
230 }
231 }
232 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
233 return false
234 }
235 return true
236 }
237 func (m *Foo) Marshal() (dAtA []byte, err error) {
238 size := m.Size()
239 dAtA = make([]byte, size)
240 n, err := m.MarshalToSizedBuffer(dAtA[:size])
241 if err != nil {
242 return nil, err
243 }
244 return dAtA[:n], nil
245 }
246
247 func (m *Foo) MarshalTo(dAtA []byte) (int, error) {
248 size := m.Size()
249 return m.MarshalToSizedBuffer(dAtA[:size])
250 }
251
252 func (m *Foo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
253 i := len(dAtA)
254 _ = i
255 var l int
256 _ = l
257 if m.XXX_unrecognized != nil {
258 i -= len(m.XXX_unrecognized)
259 copy(dAtA[i:], m.XXX_unrecognized)
260 }
261 if len(m.Dat1) > 0 {
262 for iNdEx := len(m.Dat1) - 1; iNdEx >= 0; iNdEx-- {
263 i -= len(m.Dat1[iNdEx])
264 copy(dAtA[i:], m.Dat1[iNdEx])
265 i = encodeVarintIssue503(dAtA, i, uint64(len(m.Dat1[iNdEx])))
266 i--
267 dAtA[i] = 0x22
268 }
269 }
270 if len(m.Str1) > 0 {
271 for iNdEx := len(m.Str1) - 1; iNdEx >= 0; iNdEx-- {
272 i -= len(m.Str1[iNdEx])
273 copy(dAtA[i:], m.Str1[iNdEx])
274 i = encodeVarintIssue503(dAtA, i, uint64(len(m.Str1[iNdEx])))
275 i--
276 dAtA[i] = 0x1a
277 }
278 }
279 if len(m.Num2) > 0 {
280 dAtA2 := make([]byte, len(m.Num2)*10)
281 var j1 int
282 for _, num1 := range m.Num2 {
283 num := uint64(num1)
284 for num >= 1<<7 {
285 dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80)
286 num >>= 7
287 j1++
288 }
289 dAtA2[j1] = uint8(num)
290 j1++
291 }
292 i -= j1
293 copy(dAtA[i:], dAtA2[:j1])
294 i = encodeVarintIssue503(dAtA, i, uint64(j1))
295 i--
296 dAtA[i] = 0x12
297 }
298 if len(m.Num1) > 0 {
299 dAtA4 := make([]byte, len(m.Num1)*10)
300 var j3 int
301 for _, num1 := range m.Num1 {
302 num := uint64(num1)
303 for num >= 1<<7 {
304 dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80)
305 num >>= 7
306 j3++
307 }
308 dAtA4[j3] = uint8(num)
309 j3++
310 }
311 i -= j3
312 copy(dAtA[i:], dAtA4[:j3])
313 i = encodeVarintIssue503(dAtA, i, uint64(j3))
314 i--
315 dAtA[i] = 0xa
316 }
317 return len(dAtA) - i, nil
318 }
319
320 func encodeVarintIssue503(dAtA []byte, offset int, v uint64) int {
321 offset -= sovIssue503(v)
322 base := offset
323 for v >= 1<<7 {
324 dAtA[offset] = uint8(v&0x7f | 0x80)
325 v >>= 7
326 offset++
327 }
328 dAtA[offset] = uint8(v)
329 return base
330 }
331 func NewPopulatedFoo(r randyIssue503, easy bool) *Foo {
332 this := &Foo{}
333 v1 := r.Intn(10)
334 this.Num1 = make([]int64, v1)
335 for i := 0; i < v1; i++ {
336 this.Num1[i] = int64(r.Int63())
337 if r.Intn(2) == 0 {
338 this.Num1[i] *= -1
339 }
340 }
341 v2 := r.Intn(10)
342 this.Num2 = make([]int32, v2)
343 for i := 0; i < v2; i++ {
344 this.Num2[i] = int32(r.Int31())
345 if r.Intn(2) == 0 {
346 this.Num2[i] *= -1
347 }
348 }
349 v3 := r.Intn(10)
350 this.Str1 = make([]string, v3)
351 for i := 0; i < v3; i++ {
352 this.Str1[i] = string(randStringIssue503(r))
353 }
354 v4 := r.Intn(10)
355 this.Dat1 = make([][]byte, v4)
356 for i := 0; i < v4; i++ {
357 v5 := r.Intn(100)
358 this.Dat1[i] = make([]byte, v5)
359 for j := 0; j < v5; j++ {
360 this.Dat1[i][j] = byte(r.Intn(256))
361 }
362 }
363 if !easy && r.Intn(10) != 0 {
364 this.XXX_unrecognized = randUnrecognizedIssue503(r, 5)
365 }
366 return this
367 }
368
369 type randyIssue503 interface {
370 Float32() float32
371 Float64() float64
372 Int63() int64
373 Int31() int32
374 Uint32() uint32
375 Intn(n int) int
376 }
377
378 func randUTF8RuneIssue503(r randyIssue503) rune {
379 ru := r.Intn(62)
380 if ru < 10 {
381 return rune(ru + 48)
382 } else if ru < 36 {
383 return rune(ru + 55)
384 }
385 return rune(ru + 61)
386 }
387 func randStringIssue503(r randyIssue503) string {
388 v6 := r.Intn(100)
389 tmps := make([]rune, v6)
390 for i := 0; i < v6; i++ {
391 tmps[i] = randUTF8RuneIssue503(r)
392 }
393 return string(tmps)
394 }
395 func randUnrecognizedIssue503(r randyIssue503, maxFieldNumber int) (dAtA []byte) {
396 l := r.Intn(5)
397 for i := 0; i < l; i++ {
398 wire := r.Intn(4)
399 if wire == 3 {
400 wire = 5
401 }
402 fieldNumber := maxFieldNumber + r.Intn(100)
403 dAtA = randFieldIssue503(dAtA, r, fieldNumber, wire)
404 }
405 return dAtA
406 }
407 func randFieldIssue503(dAtA []byte, r randyIssue503, fieldNumber int, wire int) []byte {
408 key := uint32(fieldNumber)<<3 | uint32(wire)
409 switch wire {
410 case 0:
411 dAtA = encodeVarintPopulateIssue503(dAtA, uint64(key))
412 v7 := r.Int63()
413 if r.Intn(2) == 0 {
414 v7 *= -1
415 }
416 dAtA = encodeVarintPopulateIssue503(dAtA, uint64(v7))
417 case 1:
418 dAtA = encodeVarintPopulateIssue503(dAtA, uint64(key))
419 dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
420 case 2:
421 dAtA = encodeVarintPopulateIssue503(dAtA, uint64(key))
422 ll := r.Intn(100)
423 dAtA = encodeVarintPopulateIssue503(dAtA, uint64(ll))
424 for j := 0; j < ll; j++ {
425 dAtA = append(dAtA, byte(r.Intn(256)))
426 }
427 default:
428 dAtA = encodeVarintPopulateIssue503(dAtA, uint64(key))
429 dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
430 }
431 return dAtA
432 }
433 func encodeVarintPopulateIssue503(dAtA []byte, v uint64) []byte {
434 for v >= 1<<7 {
435 dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
436 v >>= 7
437 }
438 dAtA = append(dAtA, uint8(v))
439 return dAtA
440 }
441 func (m *Foo) Size() (n int) {
442 if m == nil {
443 return 0
444 }
445 var l int
446 _ = l
447 if len(m.Num1) > 0 {
448 l = 0
449 for _, e := range m.Num1 {
450 l += sovIssue503(uint64(e))
451 }
452 n += 1 + sovIssue503(uint64(l)) + l
453 }
454 if len(m.Num2) > 0 {
455 l = 0
456 for _, e := range m.Num2 {
457 l += sovIssue503(uint64(e))
458 }
459 n += 1 + sovIssue503(uint64(l)) + l
460 }
461 if len(m.Str1) > 0 {
462 for _, s := range m.Str1 {
463 l = len(s)
464 n += 1 + l + sovIssue503(uint64(l))
465 }
466 }
467 if len(m.Dat1) > 0 {
468 for _, b := range m.Dat1 {
469 l = len(b)
470 n += 1 + l + sovIssue503(uint64(l))
471 }
472 }
473 if m.XXX_unrecognized != nil {
474 n += len(m.XXX_unrecognized)
475 }
476 return n
477 }
478
479 func sovIssue503(x uint64) (n int) {
480 return (math_bits.Len64(x|1) + 6) / 7
481 }
482 func sozIssue503(x uint64) (n int) {
483 return sovIssue503(uint64((x << 1) ^ uint64((int64(x) >> 63))))
484 }
485 func (m *Foo) Unmarshal(dAtA []byte) error {
486 l := len(dAtA)
487 iNdEx := 0
488 for iNdEx < l {
489 preIndex := iNdEx
490 var wire uint64
491 for shift := uint(0); ; shift += 7 {
492 if shift >= 64 {
493 return ErrIntOverflowIssue503
494 }
495 if iNdEx >= l {
496 return io.ErrUnexpectedEOF
497 }
498 b := dAtA[iNdEx]
499 iNdEx++
500 wire |= uint64(b&0x7F) << shift
501 if b < 0x80 {
502 break
503 }
504 }
505 fieldNum := int32(wire >> 3)
506 wireType := int(wire & 0x7)
507 if wireType == 4 {
508 return fmt.Errorf("proto: Foo: wiretype end group for non-group")
509 }
510 if fieldNum <= 0 {
511 return fmt.Errorf("proto: Foo: illegal tag %d (wire type %d)", fieldNum, wire)
512 }
513 switch fieldNum {
514 case 1:
515 if wireType == 0 {
516 var v int64
517 for shift := uint(0); ; shift += 7 {
518 if shift >= 64 {
519 return ErrIntOverflowIssue503
520 }
521 if iNdEx >= l {
522 return io.ErrUnexpectedEOF
523 }
524 b := dAtA[iNdEx]
525 iNdEx++
526 v |= int64(b&0x7F) << shift
527 if b < 0x80 {
528 break
529 }
530 }
531 m.Num1 = append(m.Num1, v)
532 } else if wireType == 2 {
533 var packedLen int
534 for shift := uint(0); ; shift += 7 {
535 if shift >= 64 {
536 return ErrIntOverflowIssue503
537 }
538 if iNdEx >= l {
539 return io.ErrUnexpectedEOF
540 }
541 b := dAtA[iNdEx]
542 iNdEx++
543 packedLen |= int(b&0x7F) << shift
544 if b < 0x80 {
545 break
546 }
547 }
548 if packedLen < 0 {
549 return ErrInvalidLengthIssue503
550 }
551 postIndex := iNdEx + packedLen
552 if postIndex < 0 {
553 return ErrInvalidLengthIssue503
554 }
555 if postIndex > l {
556 return io.ErrUnexpectedEOF
557 }
558 var elementCount int
559 var count int
560 for _, integer := range dAtA[iNdEx:postIndex] {
561 if integer < 128 {
562 count++
563 }
564 }
565 elementCount = count
566 if elementCount != 0 && len(m.Num1) == 0 {
567 m.Num1 = make([]int64, 0, elementCount)
568 }
569 for iNdEx < postIndex {
570 var v int64
571 for shift := uint(0); ; shift += 7 {
572 if shift >= 64 {
573 return ErrIntOverflowIssue503
574 }
575 if iNdEx >= l {
576 return io.ErrUnexpectedEOF
577 }
578 b := dAtA[iNdEx]
579 iNdEx++
580 v |= int64(b&0x7F) << shift
581 if b < 0x80 {
582 break
583 }
584 }
585 m.Num1 = append(m.Num1, v)
586 }
587 } else {
588 return fmt.Errorf("proto: wrong wireType = %d for field Num1", wireType)
589 }
590 case 2:
591 if wireType == 0 {
592 var v int32
593 for shift := uint(0); ; shift += 7 {
594 if shift >= 64 {
595 return ErrIntOverflowIssue503
596 }
597 if iNdEx >= l {
598 return io.ErrUnexpectedEOF
599 }
600 b := dAtA[iNdEx]
601 iNdEx++
602 v |= int32(b&0x7F) << shift
603 if b < 0x80 {
604 break
605 }
606 }
607 m.Num2 = append(m.Num2, v)
608 } else if wireType == 2 {
609 var packedLen int
610 for shift := uint(0); ; shift += 7 {
611 if shift >= 64 {
612 return ErrIntOverflowIssue503
613 }
614 if iNdEx >= l {
615 return io.ErrUnexpectedEOF
616 }
617 b := dAtA[iNdEx]
618 iNdEx++
619 packedLen |= int(b&0x7F) << shift
620 if b < 0x80 {
621 break
622 }
623 }
624 if packedLen < 0 {
625 return ErrInvalidLengthIssue503
626 }
627 postIndex := iNdEx + packedLen
628 if postIndex < 0 {
629 return ErrInvalidLengthIssue503
630 }
631 if postIndex > l {
632 return io.ErrUnexpectedEOF
633 }
634 var elementCount int
635 var count int
636 for _, integer := range dAtA[iNdEx:postIndex] {
637 if integer < 128 {
638 count++
639 }
640 }
641 elementCount = count
642 if elementCount != 0 && len(m.Num2) == 0 {
643 m.Num2 = make([]int32, 0, elementCount)
644 }
645 for iNdEx < postIndex {
646 var v int32
647 for shift := uint(0); ; shift += 7 {
648 if shift >= 64 {
649 return ErrIntOverflowIssue503
650 }
651 if iNdEx >= l {
652 return io.ErrUnexpectedEOF
653 }
654 b := dAtA[iNdEx]
655 iNdEx++
656 v |= int32(b&0x7F) << shift
657 if b < 0x80 {
658 break
659 }
660 }
661 m.Num2 = append(m.Num2, v)
662 }
663 } else {
664 return fmt.Errorf("proto: wrong wireType = %d for field Num2", wireType)
665 }
666 case 3:
667 if wireType != 2 {
668 return fmt.Errorf("proto: wrong wireType = %d for field Str1", wireType)
669 }
670 var stringLen uint64
671 for shift := uint(0); ; shift += 7 {
672 if shift >= 64 {
673 return ErrIntOverflowIssue503
674 }
675 if iNdEx >= l {
676 return io.ErrUnexpectedEOF
677 }
678 b := dAtA[iNdEx]
679 iNdEx++
680 stringLen |= uint64(b&0x7F) << shift
681 if b < 0x80 {
682 break
683 }
684 }
685 intStringLen := int(stringLen)
686 if intStringLen < 0 {
687 return ErrInvalidLengthIssue503
688 }
689 postIndex := iNdEx + intStringLen
690 if postIndex < 0 {
691 return ErrInvalidLengthIssue503
692 }
693 if postIndex > l {
694 return io.ErrUnexpectedEOF
695 }
696 m.Str1 = append(m.Str1, string(dAtA[iNdEx:postIndex]))
697 iNdEx = postIndex
698 case 4:
699 if wireType != 2 {
700 return fmt.Errorf("proto: wrong wireType = %d for field Dat1", wireType)
701 }
702 var byteLen int
703 for shift := uint(0); ; shift += 7 {
704 if shift >= 64 {
705 return ErrIntOverflowIssue503
706 }
707 if iNdEx >= l {
708 return io.ErrUnexpectedEOF
709 }
710 b := dAtA[iNdEx]
711 iNdEx++
712 byteLen |= int(b&0x7F) << shift
713 if b < 0x80 {
714 break
715 }
716 }
717 if byteLen < 0 {
718 return ErrInvalidLengthIssue503
719 }
720 postIndex := iNdEx + byteLen
721 if postIndex < 0 {
722 return ErrInvalidLengthIssue503
723 }
724 if postIndex > l {
725 return io.ErrUnexpectedEOF
726 }
727 m.Dat1 = append(m.Dat1, make([]byte, postIndex-iNdEx))
728 copy(m.Dat1[len(m.Dat1)-1], dAtA[iNdEx:postIndex])
729 iNdEx = postIndex
730 default:
731 iNdEx = preIndex
732 skippy, err := skipIssue503(dAtA[iNdEx:])
733 if err != nil {
734 return err
735 }
736 if (skippy < 0) || (iNdEx+skippy) < 0 {
737 return ErrInvalidLengthIssue503
738 }
739 if (iNdEx + skippy) > l {
740 return io.ErrUnexpectedEOF
741 }
742 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
743 iNdEx += skippy
744 }
745 }
746
747 if iNdEx > l {
748 return io.ErrUnexpectedEOF
749 }
750 return nil
751 }
752 func skipIssue503(dAtA []byte) (n int, err error) {
753 l := len(dAtA)
754 iNdEx := 0
755 depth := 0
756 for iNdEx < l {
757 var wire uint64
758 for shift := uint(0); ; shift += 7 {
759 if shift >= 64 {
760 return 0, ErrIntOverflowIssue503
761 }
762 if iNdEx >= l {
763 return 0, io.ErrUnexpectedEOF
764 }
765 b := dAtA[iNdEx]
766 iNdEx++
767 wire |= (uint64(b) & 0x7F) << shift
768 if b < 0x80 {
769 break
770 }
771 }
772 wireType := int(wire & 0x7)
773 switch wireType {
774 case 0:
775 for shift := uint(0); ; shift += 7 {
776 if shift >= 64 {
777 return 0, ErrIntOverflowIssue503
778 }
779 if iNdEx >= l {
780 return 0, io.ErrUnexpectedEOF
781 }
782 iNdEx++
783 if dAtA[iNdEx-1] < 0x80 {
784 break
785 }
786 }
787 case 1:
788 iNdEx += 8
789 case 2:
790 var length int
791 for shift := uint(0); ; shift += 7 {
792 if shift >= 64 {
793 return 0, ErrIntOverflowIssue503
794 }
795 if iNdEx >= l {
796 return 0, io.ErrUnexpectedEOF
797 }
798 b := dAtA[iNdEx]
799 iNdEx++
800 length |= (int(b) & 0x7F) << shift
801 if b < 0x80 {
802 break
803 }
804 }
805 if length < 0 {
806 return 0, ErrInvalidLengthIssue503
807 }
808 iNdEx += length
809 case 3:
810 depth++
811 case 4:
812 if depth == 0 {
813 return 0, ErrUnexpectedEndOfGroupIssue503
814 }
815 depth--
816 case 5:
817 iNdEx += 4
818 default:
819 return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
820 }
821 if iNdEx < 0 {
822 return 0, ErrInvalidLengthIssue503
823 }
824 if depth == 0 {
825 return iNdEx, nil
826 }
827 }
828 return 0, io.ErrUnexpectedEOF
829 }
830
831 var (
832 ErrInvalidLengthIssue503 = fmt.Errorf("proto: negative length found during unmarshaling")
833 ErrIntOverflowIssue503 = fmt.Errorf("proto: integer overflow")
834 ErrUnexpectedEndOfGroupIssue503 = fmt.Errorf("proto: unexpected end of group")
835 )
836
View as plain text