diff options
author | woclass <inkydragon@users.noreply.github.com> | 2018-12-03 20:30:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-03 20:30:45 +0800 |
commit | cd7816a2be62b0dcd2aca181d1aadd68b8e4d5d7 (patch) | |
tree | f75c300c92d40e29bf59f83775aec019b45e56e7 /go.html.markdown | |
parent | 440247a59706603bd980016821ecd6a72a6182d1 (diff) | |
parent | 1fd955ae6479650b987a54a93b09507bfdf06954 (diff) |
Merge pull request #1 from adambard/master
Update from Upstream
Diffstat (limited to 'go.html.markdown')
-rw-r--r-- | go.html.markdown | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/go.html.markdown b/go.html.markdown index df677894..ae99535b 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -277,7 +277,8 @@ func sentenceFactory(mystring string) func(before, after string) string { } func learnDefer() (ok bool) { - // Deferred statements are executed just before the function returns. + // A defer statement pushes a function call onto a list. The list of saved + // calls is executed AFTER the surrounding function returns. defer fmt.Println("deferred statements execute in reverse (LIFO) order.") defer fmt.Println("\nThis line is being printed first because") // Defer is commonly used to close a file, so the function closing the |