MCPcopy Create free account
hub / github.com/github/gh-aw / writeUpdateCheckTime

Function writeUpdateCheckTime

pkg/cli/update_check_state.go:58–67  ·  view source on GitHub ↗
(path string, perm os.FileMode, label string, log *logger.Logger)

Source from the content-addressed store, hash-verified

56}
57
58func writeUpdateCheckTime(path string, perm os.FileMode, label string, log *logger.Logger) {
59 if path == "" {
60 return
61 }
62
63 timestamp := time.Now().Format(time.RFC3339)
64 if err := os.WriteFile(path, []byte(timestamp), perm); err != nil {
65 log.Printf("Error writing %s time: %v", label, err)
66 }
67}

Callers 2

updateLastCheckTimeFunction · 0.85

Calls 1

PrintfMethod · 0.45

Tested by

no test coverage detected