InitUpdates initializes the updates cache, if the config value is set It uses the defaultUpdatesCacheTime for the cache expiry
()
| 107 | // InitUpdates initializes the updates cache, if the config value is set |
| 108 | // It uses the defaultUpdatesCacheTime for the cache expiry |
| 109 | func (app *App) InitUpdates() { |
| 110 | if app.cfg.App.UpdateChecks { |
| 111 | app.updates = newUpdatesCache(defaultUpdatesCacheTime) |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | func newVersionCheck() (string, error) { |
| 116 | res, err := http.Get("https://version.writefreely.org") |
no test coverage detected