You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is not necessarily to continue, as in the next iteration, none of the codes earlier needs to be touched. It creates unnecessarily overheads to run splitFunc without filling up data from reader, first.
I have ran scan_test.go without continue, to my surprise, they are all passed! At the very least, if it belongs there, they should add a test case that shows it. I'm generally of the opinion that if small-but-severe changes to the code don't cause tests to fail, the tests are incomplete.
In my opinion, removing a continue definitely qualifies.
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
4. What did you expect to see?
5. What did you see instead?
The text was updated successfully, but these errors were encountered:
roylee0704
changed the title
Potential Bug: Unnecessarily overheads at scan.go
Potential Bug: Unnecessarily overheads at bufio/scan.go
May 17, 2016
roylee0704
changed the title
Potential Bug: Unnecessarily overheads at bufio/scan.go
Unnecessarily overheads at bufio/scan.go
May 17, 2016
roylee0704
changed the title
Unnecessarily overheads at bufio/scan.go
Potential Bug: Unnecessarily overheads at bufio/scan.go
May 17, 2016
bradfitz
changed the title
Potential Bug: Unnecessarily overheads at bufio/scan.go
bufio: potentially unnecessary "continue" in bufio/scan.go
May 17, 2016
quentinmit
added
the
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
label
Oct 10, 2016
I agree the code remains correct if the continue is removed and that it eliminates a redundant call to s.split. It seems fine to remove. @quentinmit, want to do this?
rsc
added
NeedsFix
The path to resolution is known, but the work has not been done.
and removed
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
labels
Oct 10, 2016
Please answer these questions before submitting your issue. Thanks!
go version
)?go1.6.2 darwin/amd64
go env
)?bug:
bufio/scan/scan.go
, line 202.It is not necessarily to
continue
, as in the next iteration, none of the codes earlier needs to be touched. It creates unnecessarily overheads to run splitFunc without filling up data fromreader
, first.I have ran
scan_test.go
withoutcontinue
, to my surprise, they are all passed! At the very least, if it belongs there, they should add a test case that shows it. I'm generally of the opinion that if small-but-severe changes to the code don't cause tests to fail, the tests are incomplete.In my opinion, removing a
continue
definitely qualifies.If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
4. What did you expect to see?
5. What did you see instead?
The text was updated successfully, but these errors were encountered: