mirror of
https://github.com/golang/go
synced 2024-11-18 14:34:39 -07:00
f2163c4d45
golang.org/cl/229763 removed the documentation of requirements of the function passed to FieldsFunc. The current implementation does not require functions to return consistent results but this had not been the case for previous implementations. Add the requirement for consistent results back to the documentation to allow for future implementations to be more allocation efficient for an output with more than 32 fields. This is possible with a two pass algorithm first determining the number of fields used to allocate the output slice and then splitting the input into fields. While at it align the documentation of bytes.FieldsFunc with strings.FieldFunc. Fixes #38630 Change-Id: Iabbf9ca3dff0daa41f4ec930a21a3dd98e19f122 Reviewed-on: https://go-review.googlesource.com/c/go/+/230797 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> |
||
---|---|---|
.. | ||
builder_test.go | ||
builder.go | ||
compare_test.go | ||
compare.go | ||
example_test.go | ||
export_test.go | ||
reader_test.go | ||
reader.go | ||
replace_test.go | ||
replace.go | ||
search_test.go | ||
search.go | ||
strings_test.go | ||
strings.go |