Validate checks that the given array is valid, for example, that it's not too big.
()
| 3460 | // Validate checks that the given array is valid, |
| 3461 | // for example, that it's not too big. |
| 3462 | func (d *DArray) Validate() error { |
| 3463 | if d.Len() > maxArrayLength { |
| 3464 | return errors.WithStack(errArrayTooLongError) |
| 3465 | } |
| 3466 | return nil |
| 3467 | } |
| 3468 | |
| 3469 | // Len returns the length of the Datum array. |
| 3470 | func (d *DArray) Len() int { |