MCPcopy Index your code
hub / github.com/dnote/dnote / touchLastUpgrade

Function touchLastUpgrade

pkg/cli/upgrade/upgrade.go:50–60  ·  view source on GitHub ↗
(ctx context.DnoteCtx)

Source from the content-addressed store, hash-verified

48}
49
50func touchLastUpgrade(ctx context.DnoteCtx) error {
51 db := ctx.DB
52
53 now := time.Now().Unix()
54 _, err := db.Exec("UPDATE system SET value = ? WHERE key = ?", now, consts.SystemLastUpgrade)
55 if err != nil {
56 return errors.Wrap(err, "updating last_upgrade")
57 }
58
59 return nil
60}
61
62func fetchLatestStableTag(gh *github.Client, page int) (string, error) {
63 params := github.ListOptions{

Callers 1

CheckFunction · 0.85

Calls 2

NowMethod · 0.65
ExecMethod · 0.65

Tested by

no test coverage detected