1
0
mirror of https://github.com/golang/go synced 2024-11-21 23:04:39 -07:00

doc: fixed minor typo in article on defer

Fixes #3176.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5737043
This commit is contained in:
Francisco Souza 2012-03-04 11:34:21 +11:00 committed by Andrew Gerrand
parent f90fd754e3
commit b1b0b73738
2 changed files with 2 additions and 2 deletions

View 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

View 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