From ff06f9cf993c79b843008a641abb92e183cff285 Mon Sep 17 00:00:00 2001 From: Divay Prakash Date: Tue, 9 Oct 2018 22:59:19 +0530 Subject: [PATCH] Fix defer wording, closes #2673 --- go.html.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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