Check error in checkpoint callback.

This commit is contained in:
Tom Wilkie
2016-03-04 09:09:18 +00:00
parent ce90680e06
commit 0c2617debf

View File

@@ -53,7 +53,9 @@ func appMain() {
Product: "scope-app",
Version: app.Version,
}, versionCheckPeriod, func(r *checkpoint.CheckResponse, err error) {
if r.Outdated {
if err != nil {
log.Errorf("Error checking version: %v", err)
} else if r.Outdated {
log.Infof("Scope version %s is available; please update at %s",
r.CurrentVersion, r.CurrentDownloadURL)
}