x/text/transform: Document Chain buffer limit #49117
Labels
Documentation
Issues describing a change to documentation.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
There is an undocumented buffer limit of 4kb for each link in a transform.Chain
What did you do?
Implemented a
transform.Transformer
which expectstransform.Chain
to buffer allsrc
until EOF.https://play.golang.org/p/kFLxWtfNwnF
What did you expect to see?
Since the
transform.Transformer
implementation follows all the rules laid out by the docs, I expected it to work.What did you see instead?
The chain returns a "transform: short internal buffer" error if it's asked to buffer more than 4kb (while nothing is consumed).
https://cs.opensource.google/go/x/text/+/refs/tags/v0.3.7:transform/transform.go;l=454-461;drc=5bd84dd9b33bd2bdebd8a6a6477920a8e492d47f
The text was updated successfully, but these errors were encountered: