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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedNov 26, '12 at 2:58a
activeNov 26, '12 at 2:58a
posts1
users1
websitegolang.org

1 user in discussion

Bradfitz: 1 post

People

Translate

site design / logo © 2022 Grokbase