Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
main: Correct defer handling in main entrypoint.
This refactors the main code into a separate function that returns an error instead of invoking os.Exit directly to ensure that the defers that are setup prior to the exits are run as intended. The main func will now exit with the non-zero error code when an error is returned from the refactored separate func.
- Loading branch information