diff options
author | Divay Prakash <divayprakash3@gmail.com> | 2018-10-09 22:59:19 +0530 |
---|---|---|
committer | Divay Prakash <divayprakash3@gmail.com> | 2018-10-09 22:59:19 +0530 |
commit | ff06f9cf993c79b843008a641abb92e183cff285 (patch) | |
tree | ee90c5716af388d93af3f1f6f5dbf6be3dd8d7a6 | |
parent | 93fc04dbb35921cf08d7b6aa16bfdfa2758b87ac (diff) |
Fix defer wording, closes #2673
-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 |