aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/io/example_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/io/example_test.go b/src/io/example_test.go
index edcd0086f5..2eaab678c9 100644
--- a/src/io/example_test.go
+++ b/src/io/example_test.go
@@ -59,7 +59,7 @@ func ExampleCopyN() {
func ExampleReadAtLeast() {
r := strings.NewReader("some io.Reader stream to be read\n")
- buf := make([]byte, 33)
+ buf := make([]byte, 14)
if _, err := io.ReadAtLeast(r, buf, 4); err != nil {
log.Fatal(err)
}
@@ -78,10 +78,9 @@ func ExampleReadAtLeast() {
}
// Output:
- // some io.Reader stream to be read
- //
+ // some io.Reader
// error: short buffer
- // error: EOF
+ // error: unexpected EOF
}
func ExampleReadFull() {