We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Packages internal/gpx and internal/xlsx contain duplicated code that could be unfied using generics.
internal/gpx
internal/xlsx
The text was updated successfully, but these errors were encountered:
I just did an experiment using this util function that enables to use range-over-func (requires to compile with GOEXPERIMENT=rangefunc on Go 1.22):
GOEXPERIMENT=rangefunc
func iterTokens[Token any, Tokenizer interface{ Token() (Token, error) }](tok Tokenizer) iter.Seq2[Token, error] { return func(yield func(Token, error) bool) { for { token, err := tok.Token() if err == io.EOF { break } if !yield(token, err) { break } } } }
Result of the experiment: I don't think its worth it for now (especially because of GOEXPERIMENT).
Sorry, something went wrong.
See also golang/go#68259 which I just filled and which proposes to add a Tokens() iter.Seq2[Token, error] on encoding/xml.Decoder.
Tokens() iter.Seq2[Token, error]
encoding/xml.Decoder
I expect this will rejected according to @muktihari's comment on another PR: #17 (comment)
So, closing.
No branches or pull requests
Packages
internal/gpx
andinternal/xlsx
contain duplicated code that could be unfied using generics.The text was updated successfully, but these errors were encountered: