FAQ
For a CL about optimizing, you should probably include a BenchmarkFoo
function.



https://codereview.appspot.com/6842078/diff/7006/src/pkg/bufio/bufio.go
File src/pkg/bufio/bufio.go (right):

https://codereview.appspot.com/6842078/diff/7006/src/pkg/bufio/bufio.go#newcode572
src/pkg/bufio/bufio.go:572: fillFlush := func() error {
I'd make this be a (private) method on *Writer instead, even if it has
to take an explicit (rather than closed-over) io.Reader argument.

Then you can also document its function and return values more, and also
test it stand-alone easier.

Maybe call it "fillFrom".

https://codereview.appspot.com/6842078/

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 11 of 11 | next ›
Discussion Overview
groupgolang-dev @
categoriesgo
postedNov 21, '12 at 1:42a
activeNov 26, '12 at 2:58a
posts11
users3
websitegolang.org

3 users in discussion

Mchaten: 6 posts Dave Cheney: 3 posts Bradfitz: 2 posts

People

Translate

site design / logo © 2022 Grokbase