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

bufio: consider adding an option to provide a buffer to bufio.Scanner #11702

Closed
robpike opened this issue Jul 14, 2015 · 2 comments
Closed

bufio: consider adding an option to provide a buffer to bufio.Scanner #11702

robpike opened this issue Jul 14, 2015 · 2 comments

Comments

@robpike
Copy link
Contributor

robpike commented Jul 14, 2015

The fixed size of the internal buffer inside the Scanner type bothered some people when the API was proposed, but it was decided not to complicate the interface by providing a configuration.

The new io.CopyBuffer routine suggests a different model: Allow the user to provide a buffer, which not only gives control but also permits the user to manage/reuse memory when that is appropriate.

Maybe do this for 1.6.

@robpike robpike self-assigned this Jul 14, 2015
@robpike robpike added this to the Go1.6 milestone Jul 14, 2015
@robpike robpike modified the milestones: Go1.6Early, Go1.6 Aug 26, 2015
@gopherbot
Copy link

CL https://golang.org/cl/14599 mentions this issue.

@gopherbot
Copy link

CL https://golang.org/cl/14620 mentions this issue.

@golang golang locked and limited conversation to collaborators Sep 22, 2016
@rsc rsc unassigned robpike Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants