Closed
Description
Describe the enhancement requested
Previously if one wanted to iterate over the fields in the schema you would call the Fields() function and just iterate over the slice. However, due to this commit there is now an allocation and copy that happens when that's called. So to iterate over the fields without allocations one now must use the Field(i int) method; however that means a user must already know exactly how many fields are in the schema which isn't possible today.
It would be idea if there were a NumFields() int
method on schemas allowing users to iterate over the fields without copying.
Component(s)
Go