]> Cypherpunks repositories - gostls13.git/commitdiff
doc: fixed minor typo in article on defer
authorFrancisco Souza <franciscossouza@gmail.com>
Sun, 4 Mar 2012 00:34:21 +0000 (11:34 +1100)
committerAndrew Gerrand <adg@golang.org>
Sun, 4 Mar 2012 00:34:21 +0000 (11:34 +1100)
Fixes #3176.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5737043

doc/articles/defer_panic_recover.html
doc/articles/defer_panic_recover.tmpl

index 18c0de2d6c636b0e8af5ac0741f2ca6740396b87..9798bedef258e0689d82db545bcdb22dd000bc64 100644 (file)
@@ -42,7 +42,7 @@ contents of one file to the other:
 }</pre>
 
 <p>
-This works, but there is a bug. If the second call to os.Open fails, the
+This works, but there is a bug. If the call to os.Create fails, the
 function will return without closing the source file. This can be easily
 remedied by putting a call to src.Close() before the second return statement,
 but if the function were more complex the problem might not be so easily
index 60c8eebe0b39db2ac6661eb44f9de54a4f18d94a..d2ca7ae2cf3f7e208c95cb38d63cee4c8685621a 100644 (file)
@@ -22,7 +22,7 @@ contents of one file to the other:
 {{code "progs/defer.go" `/func CopyFile/` `/STOP/`}}
 
 <p>
-This works, but there is a bug. If the second call to os.Open fails, the
+This works, but there is a bug. If the call to os.Create fails, the
 function will return without closing the source file. This can be easily
 remedied by putting a call to src.Close() before the second return statement,
 but if the function were more complex the problem might not be so easily