From 318b7eb135eff9239a94a8c01daec20e414b5db4 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sun, 8 Apr 2012 14:48:29 -0400 Subject: golang notes --- software/golang.page | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 software/golang.page (limited to 'software') diff --git a/software/golang.page b/software/golang.page new file mode 100644 index 0000000..d1f961d --- /dev/null +++ b/software/golang.page @@ -0,0 +1,21 @@ + +Go Programming Language +========================= + +defer +--------- +``defer`` pushes a function call on to a local stack to be executed when the +enclosing function returns (either normally or due to a panic). The arguments +are evaluated at the time/position of the defer call, not when the defered +function itself is called (this is intuitive). + +The golang documentation gives the examples of closing file handles and +printing HTML footers (defer right after printing the header). + +Learning Resources +------------------- +In addition to the excellent dynamic Tour, documentation, and other things +listed on the golang.org front page: + +- [Network Programming with Go](http://jan.newmarch.name/go/) (unread) +- [http://go-lang.cat-v.org/] -- cgit v1.2.3