Skip to content
New issue

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

[chore][pkg/stanza] Simplify tokenize package #26040

Merged

Conversation

djaglowski
Copy link
Member

@djaglowski djaglowski commented Aug 22, 2023

This PR contains several simplifications within and relating to the new tokenization package:

  • tokenize.Multiline now returns a bufio.splitFunc without concern for a flush func. A flush func is applied later if necessary.
  • Remove tokenize.Splitter. SplitterConfig can now generate a bufio.SplitFunc directly.
  • Unexport tokenize.Flusher. FlusherConfig can now wrap a bufio.SplitFunc directly. (It does still create a struct to maintain state, but then wraps the split func with a receiver that interacts with this state.)
  • fileconsumer's internal splitter package was also simplified. It may make sense to merge this into tokenize in a future PR, but this PR is large enough.

@djaglowski
Copy link
Member Author

Rebased after #26313

@djaglowski djaglowski merged commit f6f1a24 into open-telemetry:main Aug 30, 2023
90 checks passed
@djaglowski djaglowski deleted the pkg-stanza-tokenize-simplify branch August 30, 2023 19:39
@github-actions github-actions bot added this to the next release milestone Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants