e29a81efc3
By returning an error instead of calling os.Exit, error cases can be tested easily. Error cases were not tested until now.