MCPcopy Index your code
hub / github.com/coder/coder / lastUpdateCheck

Method lastUpdateCheck

coderd/updatecheck/updatecheck.go:227–234  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

225}
226
227func (c *Checker) lastUpdateCheck(ctx context.Context) (r Result, err error) {
228 // nolint:gocritic // Getting the last update check is a system function.
229 s, err := c.db.GetLastUpdateCheck(dbauthz.AsSystemRestricted(ctx))
230 if err != nil {
231 return r, err
232 }
233 return r, json.Unmarshal([]byte(s), &r)
234}
235
236func (c *Checker) Close() error {
237 c.cancel()

Callers 2

LatestMethod · 0.95
initMethod · 0.95

Calls 3

AsSystemRestrictedFunction · 0.92
GetLastUpdateCheckMethod · 0.65
UnmarshalMethod · 0.45

Tested by

no test coverage detected