Branch: refs/heads/master
Home: https://github.com/conformal/btcwallet
Commit: 0439cdfab5d02c3ab9d3c13dc254ead731bc602b
https://github.com/conformal/btcwallet/commit/0439cdfab5d02c3ab9d3c13dc254ead731bc602b
Author: Josh Rickmar <[email protected]>
Date: 2014-06-21 (Sat, 21 Jun 2014)
Changed paths:
M cmd.go
M updates.go
Log Message:
-----------
Flush logs and run other defers before os.Exit.
As calls os.Exit do not run deferred functions (such as log flushing),
the real main function should simply run a main helper function that,
rather than exiting the program, runs all defers and returns a
possibly non-nil error. The real main function can then check the
error and close the program with an error exit status when a fatal
error occured.