The Go Blog
Defer a function call (with return value)
How to reuse test code in imported package?
gometalinter / errcheck returns a warning on deferring a func which returns a variable
The Go Programming Language Specification
defer in the loop - what will be better?
defer