Validate checks that the given array is valid, for example, that it's not too big.
()
| 5178 | // Validate checks that the given array is valid, |
| 5179 | // for example, that it's not too big. |
| 5180 | func (d *DArray) Validate() error { |
| 5181 | if d.Len() > maxArrayLength { |
| 5182 | return errors.WithStack(errArrayTooLongError) |
| 5183 | } |
| 5184 | return nil |
| 5185 | } |
| 5186 | |
| 5187 | // Len returns the length of the Datum array. |
| 5188 | func (d *DArray) Len() int { |