Skip to content

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

@robpike

Description

@robpike

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions