Validate checks that the given array is valid, for example, that it's not too big.
()
| 1726 | // Validate checks that the given array is valid, |
| 1727 | // for example, that it's not too big. |
| 1728 | func (d *DArray) Validate() error { |
| 1729 | if d.Len() > maxArrayLength { |
| 1730 | return errors.WithStack(errArrayTooLongError) |
| 1731 | } |
| 1732 | return nil |
| 1733 | } |
| 1734 | |
| 1735 | // Len returns the length of the Datum array. |
| 1736 | func (d *DArray) Len() int { |