MCPcopy
hub / github.com/writefreely/writefreely / InitUpdates

Method InitUpdates

updates.go:109–113  ·  view source on GitHub ↗

InitUpdates initializes the updates cache, if the config value is set It uses the defaultUpdatesCacheTime for the cache expiry

()

Source from the content-addressed store, hash-verified

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

Callers 1

InitializeFunction · 0.80

Calls 1

newUpdatesCacheFunction · 0.85

Tested by

no test coverage detected