prasmussen/gdrive — pull request #11 by crosbymichael (2014-03-16 01:46:07+00:00)
Title: Return error from funcs so that defers are run

If you do an os.Exit from your functions any defer's that are
supposed to be run will not because the application gets terminated.

Defers only run when the function returns so it is better to return
the errs from your functions instead of aborting with an exit. This
patch also ensures that the error messages are printed on stderr and not
stdout. FYI, fmt.Print* writes to stdout while the log pkg writes to
stderr.