From f038dae646bac2b31be98ab592c0e5206d2d96f5 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 6 Nov 2013 19:49:01 +0000 Subject: libgo: Update to October 24 version of master library. From-SVN: r204466 --- libgo/go/bufio/example_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libgo/go/bufio/example_test.go') diff --git a/libgo/go/bufio/example_test.go b/libgo/go/bufio/example_test.go index 08a3944..3da9141 100644 --- a/libgo/go/bufio/example_test.go +++ b/libgo/go/bufio/example_test.go @@ -12,6 +12,14 @@ import ( "strings" ) +func ExampleWriter() { + w := bufio.NewWriter(os.Stdout) + fmt.Fprint(w, "Hello, ") + fmt.Fprint(w, "world!") + w.Flush() // Don't forget to flush! + // Output: Hello, world! +} + // The simplest use of a Scanner, to read standard input as a set of lines. func ExampleScanner_lines() { scanner := bufio.NewScanner(os.Stdin) -- cgit v1.1