From e5102b35f6afaaf5a829768710d15924c126aeeb Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 20 Mar 2012 16:50:51 -0700 Subject: [PATCH] doc: remove reference to deleted os.ENOSPC R=golang-dev, gri, r, r CC=golang-dev https://golang.org/cl/5866046 --- doc/effective_go.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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
     }