golang / golang/go

proposal: bufio: add Scanner.Reset(io.Reader)

Open
#69,167 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Proposal
Dominant language
Go
Stars
139k
Forks
19.9k
PR merge metrics
PR metrics pending

Description

Proposal Details

It seems like an oversight that both bufio.Writer and bufio.Reader both can reuse their memory with the Reset method while Scanner does not have same method.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting bufio.Scanner and compare its reuse behavior with the existing Reset methods on bufio.Reader and bufio.Writer. Determine the expected Scanner.Reset(io.Reader) behavior from those related APIs; done means Scanner can be reused with a new reader while retaining its memory.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.