mirror of
https://github.com/golang/go
synced 2024-11-05 15:06:09 -07:00
f798dc6825
Previously when a printer had a large buffer we dropped both the buffer and the printer. There is no need to drop the printer in this case, as a printer with a nil buffer is valid. So we just drop the buffer and recycle the printer anyway. This saves one allocation in case the buffer is over the limit. Also tighten some of the tests for other unrelated cases. Change-Id: Iba1b6a71ca4691464b8c68ab0b6ab0d4d5d6168c Reviewed-on: https://go-review.googlesource.com/c/go/+/427395 Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Rob Pike <r@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Rob Pike <r@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> |
||
---|---|---|
.. | ||
doc.go | ||
errors_test.go | ||
errors.go | ||
example_test.go | ||
export_test.go | ||
fmt_test.go | ||
format.go | ||
gostringer_example_test.go | ||
print.go | ||
scan_test.go | ||
scan.go | ||
state_test.go | ||
stringer_example_test.go | ||
stringer_test.go |