diff --git a/examples/temporary-files-and-directories/temporary-files-and-directories.go b/examples/temporary-files-and-directories/temporary-files-and-directories.go index abed14e..c41d230 100644 --- a/examples/temporary-files-and-directories/temporary-files-and-directories.go +++ b/examples/temporary-files-and-directories/temporary-files-and-directories.go @@ -53,6 +53,7 @@ func main() { // `TempFile`'s, but it returns a directory *name* // rather than an open file. dname, err := ioutil.TempDir("", "sampledir") + check(err) fmt.Println("Temp dir name:", dname) defer os.RemoveAll(dname) 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.go b/examples/writing-files/writing-files.go index 82275ce..ef8bd06 100644 --- a/examples/writing-files/writing-files.go +++ b/examples/writing-files/writing-files.go @@ -40,6 +40,7 @@ func main() { // A `WriteString` is also available. n3, err := f.WriteString("writes\n") + check(err) fmt.Printf("wrote %d bytes\n", n3) // Issue a `Sync` to flush writes to stable storage. @@ -49,6 +50,7 @@ func main() { // 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) // Use `Flush` to ensure all buffered operations have 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 346ae74..1110be0 100644 --- a/public/temporary-files-and-directories +++ b/public/temporary-files-and-directories @@ -45,7 +45,7 @@ time.
package main
dname, err := ioutil.TempDir("", "sampledir")
+ check(err)
fmt.Println("Temp dir name:", dname)