diff --git a/doc/effective_go.html b/doc/effective_go.html index 984533706c1..f93a8645d9c 100644 --- a/doc/effective_go.html +++ b/doc/effective_go.html @@ -2711,11 +2711,11 @@ field for recoverable failures.
 for try := 0; try < 2; try++ {
-    file, err = os.Open(filename)
+    file, err = os.Create(filename)
     if err == nil {
         return
     }
-    if e, ok := err.(*os.PathError); ok && e.Err == os.ENOSPC {
+    if e, ok := err.(*os.PathError); ok && e.Err == syscall.ENOSPC {
         deleteTempFiles()  // Recover some space.
         continue
     }