x/text/unicode/bidi: API not implemented but code works fine #42356
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?The code in unicode/bidi is working fine (as far as I can see), but there is no user level API available, though it is documented. See https://pkg.go.dev/golang.org/x/text/unicode/bidi for example. All methods are unimplemented (
panic()
).I suggest to change the API slightly to avoid panics in the library (should be errors instead) and perhaps to clarify the parameters. For example the func (*Paragraph) Line could mention if the start and end parameters are given in bytes or runes.
I am working on an implementation of the API and my question is: is it worth issuing a pull request or is the API left out on purpose?
Would it be okay to remove the panics and return errors instead?
My background is that I am using the bidi algorithm of my TeX based typesetting system and currently just pulling in the relevant files.
The text was updated successfully, but these errors were encountered: