You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
As far as I can see there is no (standardised) way to make a controlled exit of the program with an error message and exit code
Describe the solution you'd like
Take you http example, for instance. In the case that the server responds with an error HTTP status code, you are currently just printing the error, but the program keeps running and all I can do is exit with "q, ctrl+c".
Really what I would expect as a user is probably to receive an error message (maybe even in a bold red font) to stderr (not stdout) and for the program to stop with a non-0 error code.
Is there a recommended way for doing this at the moment?
Describe alternatives you've considered
To achieve the above at the moment, what I'd probably do is, format the message myself to look more like an error and simply exit the program in my View() function with log.Fatalf()
Additional context
n/a
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
As far as I can see there is no (standardised) way to make a controlled exit of the program with an error message and exit code
Describe the solution you'd like
Take you http example, for instance. In the case that the server responds with an error HTTP status code, you are currently just printing the error, but the program keeps running and all I can do is exit with "q, ctrl+c".
Really what I would expect as a user is probably to receive an error message (maybe even in a bold red font) to stderr (not stdout) and for the program to stop with a non-0 error code.
Is there a recommended way for doing this at the moment?
Describe alternatives you've considered
To achieve the above at the moment, what I'd probably do is, format the message myself to look more like an error and simply exit the program in my View() function with log.Fatalf()
Additional context
n/a
The text was updated successfully, but these errors were encountered: