diff --git a/examples/temporary-files-and-directories/temporary-files-and-directories.hash b/examples/temporary-files-and-directories/temporary-files-and-directories.hash index ebe1eeb..cf6faa7 100644 --- a/examples/temporary-files-and-directories/temporary-files-and-directories.hash +++ b/examples/temporary-files-and-directories/temporary-files-and-directories.hash @@ -1,2 +1,2 @@ -371689e72c46daa43eefbd9b9f4eaa3c490e7fd2 -yKWE4QTsYQr +cc4755e23cb4ba3c0e0ef5554ec9e9477372422a +nMpjCsALS6P diff --git a/examples/writing-files/writing-files.hash b/examples/writing-files/writing-files.hash index 3d09d10..1513200 100644 --- a/examples/writing-files/writing-files.hash +++ b/examples/writing-files/writing-files.hash @@ -1,2 +1,2 @@ -d4f19bc0168674b17551bbf55bab7af989452d0e -8kx-qYUXBpA +314a0074840e22b328b6412130c17b9bea53c9c9 +fQ7sd4gXv0F diff --git a/public/temporary-files-and-directories b/public/temporary-files-and-directories index 3919f36..c6f46d3 100644 --- a/public/temporary-files-and-directories +++ b/public/temporary-files-and-directories @@ -45,7 +45,7 @@ time.

- +
package main
 
@@ -175,6 +175,7 @@ rather than an open file.

    dname, err := ioutil.TempDir("", "sampledir")
+    check(err)
     fmt.Println("Temp dir name:", dname)
 
@@ -241,7 +242,7 @@ prefixing them with our temporary directory.

diff --git a/public/writing-files b/public/writing-files index 49214e1..3b20793 100644 --- a/public/writing-files +++ b/public/writing-files @@ -42,7 +42,7 @@ ones we saw earlier for reading.

- +
package main
 
@@ -162,6 +162,7 @@ after opening a file.

    n3, err := f.WriteString("writes\n")
+    check(err)
     fmt.Printf("wrote %d bytes\n", n3)
 
@@ -191,6 +192,7 @@ to the buffered readers we saw earlier.

    w := bufio.NewWriter(f)
     n4, err := w.WriteString("buffered\n")
+    check(err)
     fmt.Printf("wrote %d bytes\n", n4)
 
@@ -287,7 +289,7 @@ we’ve just seen to the stdin and stdout streams.