aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/bytes/example_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/bytes/example_test.go')
-rw-r--r--libgo/go/bytes/example_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/go/bytes/example_test.go b/libgo/go/bytes/example_test.go
index 0234a012a4e..6fe8cd5a90c 100644
--- a/libgo/go/bytes/example_test.go
+++ b/libgo/go/bytes/example_test.go
@@ -11,18 +11,18 @@ import (
"os"
)
-// Hello world!
func ExampleBuffer() {
var b Buffer // A Buffer needs no initialization.
b.Write([]byte("Hello "))
b.Write([]byte("world!"))
b.WriteTo(os.Stdout)
+ // Output: Hello world!
}
-// Gophers rule!
func ExampleBuffer_reader() {
// A Buffer can turn a string or a []byte into an io.Reader.
buf := NewBufferString("R29waGVycyBydWxlIQ==")
dec := base64.NewDecoder(base64.StdEncoding, buf)
io.Copy(os.Stdout, dec)
+ // Output: Gophers rule!
}