-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.PerformanceSuggestedIssues that may be good for new contributors looking for work to do.Issues that may be good for new contributors looking for work to do.help wanted
Milestone
Description
I just came across some code that does this rather natural thing:
r := bufio.NewReader(bytes.NewReader(buf))
// use r to do bufio-ish thingsHowever, len(buf) is typically low, much smaller than the default buffer size of 4096. I think that bufio.NewReader should check whether r is a *bytes.Reader, and if so, use r.Len() to size the buffer (assuming r.Len() is less than 4096).
Implementation is easy, and would be a good first contribution for someone.
Any objections?
cc @griesemer @bradfitz @ianlancetaylor per golang.org/s/owners
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.PerformanceSuggestedIssues that may be good for new contributors looking for work to do.Issues that may be good for new contributors looking for work to do.help wanted