sanbornm/go-selfupdate

WantUpdate method comment

capricornusx opened this issue · 0 comments

The comment does not correspond to the logic of the function.
Which should be correct, comment or code?

// WantUpdate returns boolean designating if an update is desired. If the app's version
// is `dev` WantUpdate will return false. If u.ForceCheck is true or cktime is after now
// WantUpdate will return true.
func (u *Updater) WantUpdate() bool {
if u.CurrentVersion == "dev" || (!u.ForceCheck && u.NextUpdate().After(time.Now())) {
return false
}
return true
}