sanbornm / go-selfupdate

Enable your Go applications to self update
MIT License
1.53k stars 176 forks source link

Allow the caller to know if an update was attempted #11

Closed fromkeith closed 1 year ago

fromkeith commented 9 years ago

I would like to know if an update was attempted or completed successfully. Basically, need to know the difference between not needing to update (err = nil), and an update successfully occurring (err = nil). From this I can alert the user that an update is ready and they should restart their application.

I'm currently returning a boolean to indicate whether or not we attempted to update. Then the error determines if it was successful or failed. I'm showing 'true' when we attempt to update because we may want to, in the future, allow the 'wantUpdate' to be bypassed.

sanbornm commented 9 years ago

Thanks for the contribution!

Is it possible to include some unit tests for this change?

fromkeith commented 9 years ago

Do you have existing unit tests that I can update? All the "_test" files I see are empty...