Skip to content

app.Run() should return an error. os.Exit(1) should be avoided #39

@codegangsta

Description

@codegangsta

@kytrinyx @msgehard This may affect you guys so I would like to know what you think about this.

I got bit recently by this, basically when an error occurs, like incorrect usage in a FlagSet or failing to find a help topic we call an os.Exit(1). This is convenient for the most part also terminates the app when you may not desire it.

The proposal is to basically replace the os.Exit(1) with a error return on app.Run(). That way these errors can be handled any way the developer wants to. This also feels a lot more idiomatic in terms of Go.

Let me know what you think. I would really love to get this to 1.0 So the api can get locked in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions