ghchinoy: add example for ioutil.WriteFile

Change-Id: I65c3bda498562fdf39994ec1cadce7947e2d84b5
Reviewed-on: https://go-review.googlesource.com/132277
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
diff --git a/src/io/ioutil/example_test.go b/src/io/ioutil/example_test.go
index 0b24f67..a7d340b 100644
--- a/src/io/ioutil/example_test.go
+++ b/src/io/ioutil/example_test.go
@@ -99,3 +99,11 @@
 	// Output:
 	// File contents: Hello, Gophers!
 }
+
+func ExampleWriteFile() {
+	message := []byte("Hello, Gophers!")
+	err := ioutil.WriteFile("testdata/hello", message, 0644)
+	if err != nil {
+		log.Fatal(err)
+	}
+}