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.
Cobra Command structs can use either the Run or RunE fields to run actual commands. Using RunE for commands rather than Run allows us to return errors when commands fail, which can be nicer to work with than using logger.Fatal.
Describe the solution you'd like
All commands that are populated with Run set are populated with RunE set instead.
Describe alternatives you've considered
We can leave things as they are, but it makes commands harder to read and test.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Cobra
Command
structs can use either theRun
orRunE
fields to run actual commands. UsingRunE
for commands rather thanRun
allows us to return errors when commands fail, which can be nicer to work with than usinglogger.Fatal
.Describe the solution you'd like
All commands that are populated with
Run
set are populated withRunE
set instead.Describe alternatives you've considered
We can leave things as they are, but it makes commands harder to read and test.
The text was updated successfully, but these errors were encountered: