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

Method Latest

coderd/updatecheck/updatecheck.go:100–110  ·  view source on GitHub ↗

Latest returns the latest version of Coder.

(ctx context.Context)

Source from the content-addressed store, hash-verified

98
99// Latest returns the latest version of Coder.
100func (c *Checker) Latest(ctx context.Context) (r Result, err error) {
101 select {
102 case <-c.ctx.Done():
103 return r, c.ctx.Err()
104 case <-ctx.Done():
105 return r, ctx.Err()
106 case <-c.firstCheck:
107 }
108
109 return c.lastUpdateCheck(ctx)
110}
111
112func (c *Checker) init() (Result, error) {
113 defer close(c.firstCheck)

Callers 2

updateCheckMethod · 0.80
TestChecker_LatestFunction · 0.80

Calls 3

lastUpdateCheckMethod · 0.95
ErrMethod · 0.80
DoneMethod · 0.45

Tested by 1

TestChecker_LatestFunction · 0.64