veyron/lib/cmdline: Add ErrExitCode to support exit codes.
Previously cmdline users had to call os.Exit directly within
their Run function in order to have their program exit with a
specific error code. After this change, they can return an error
of type ErrExitCode to specify an explicit exit code.
ErrUsage has been updated to simply correspond to ErrExitCode(1).
Command.Errorf() is renamed to Command.UsageErrorf(), to make it
more obvious that it will print out the usage.
Change-Id: Ie8948edf8cd1d3cac87efefcf5b43459691998a0
9 files changed