MCPcopy Create free account
hub / github.com/anchordotdev/cli / IsFreshLatestRelease

Function IsFreshLatestRelease

cli.go:55–62  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

53}
54
55func IsFreshLatestRelease(ctx context.Context) (bool, error) {
56 release, err := getLatestRelease(ctx)
57 if err != nil {
58 return true, err
59 }
60
61 return release.PublishedAt != nil && time.Since(release.PublishedAt.Time).Hours() < 24, nil
62}
63
64func IsUpgradeable(ctx context.Context) (bool, error) {
65 release, err := getLatestRelease(ctx)

Callers 1

ReleaseCheckFunction · 0.92

Calls 1

getLatestReleaseFunction · 0.85

Tested by

no test coverage detected