Conversation
| err := open.Prompt("state --version") | ||
| if err != nil { | ||
| handleError(errs.Wrap(err, "Could not open command prompt")) | ||
| return errs.Wrap(err, "Could not open command prompt") |
There was a problem hiding this comment.
Looking at this again now, this feels like it should just be logging the error. Since we don't want to end things just cause the "About" click caused an error.
There was a problem hiding this comment.
Makes sense. What do you think about setting logging to verbose by default here so that any calls to logging.Error also print? That way we don't have to do the additional call to fmt.Fprintln
There was a problem hiding this comment.
Sure, I think that makes sense.
| } | ||
|
|
||
| func onReady() { | ||
| err := run() |
There was a problem hiding this comment.
So is the ONLY error that can happen at the moment the "About" click? The systray stuff just doesn't throw errors?
There was a problem hiding this comment.
Correct, nothing in the systray library returns an error. I'm not sure if this run function is necessary anymore if we are going to be logging the errors when they occur. Do you still want it?
There was a problem hiding this comment.
Let's leave run where it is, that at least establishes the contract we want to keep long term.
https://www.pivotaltracker.com/story/show/177209445