Re:When in Go, do as Gophers do
by _blob on Sunday December 07, 2014 @11:12AM
(#8712570)
In the original code if out.Close() returns an error, run() will return nil. The revised code sets `err` to the returned error from out.Close(), in case the error from os.Create(*output) is nil.
Simply spoken, the original code will suppress the error from out.Close().
Simply spoken, the original code will suppress the error from out.Close().