This repository has been archived by the owner on May 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
feat: trim whitechars for file with multiline #212
Merged
djaglowski
merged 3 commits into
open-telemetry:main
from
SumoLogic:drosiek-trim-whitechars
Jul 9, 2021
Merged
feat: trim whitechars for file with multiline #212
djaglowski
merged 3 commits into
open-telemetry:main
from
SumoLogic:drosiek-trim-whitechars
Jul 9, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## main #212 +/- ##
=======================================
- Coverage 75.6% 75.5% -0.1%
=======================================
Files 95 95
Lines 4399 4408 +9
=======================================
+ Hits 3327 3332 +5
- Misses 745 748 +3
- Partials 327 328 +1
|
Signed-off-by: Dominik Rosiek <[email protected]>
864c23a
to
fd4dbb8
Compare
djaglowski
reviewed
Jul 6, 2021
operator/helper/multiline.go
Outdated
Comment on lines
82
to
83
token = trimWhitespaces(data) | ||
advance = len(token) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
advance
is used to set the starting point for the next read. By advancing after trimming, I think we may be setting up the value such that we will reread the whitespace, which doesn't seem ideal. Unless I'm misunderstanding some part of this, then I would expect that we do:
Suggested change
token = trimWhitespaces(data) | |
advance = len(token) | |
token = trimWhitespaces(data) | |
advance = len(data) |
9fd0858
to
cceeaeb
Compare
…m beginning of log Signed-off-by: Dominik Rosiek <[email protected]>
cceeaeb
to
e67e78e
Compare
djaglowski
reviewed
Jul 7, 2021
djaglowski
approved these changes
Jul 8, 2021
Signed-off-by: Dominik Rosiek <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Strip whitechars if using multiline