MCPcopy Create free account
hub / github.com/cli/cli / getStateEntry

Function getStateEntry

internal/update/update.go:149–162  ·  view source on GitHub ↗
(stateFilePath string)

Source from the content-addressed store, hash-verified

147}
148
149func getStateEntry(stateFilePath string) (*StateEntry, error) {
150 content, err := os.ReadFile(stateFilePath)
151 if err != nil {
152 return nil, err
153 }
154
155 var stateEntry StateEntry
156 err = yaml.Unmarshal(content, &stateEntry)
157 if err != nil {
158 return nil, err
159 }
160
161 return &stateEntry, nil
162}
163
164func setStateEntry(stateFilePath string, t time.Time, r ReleaseInfo) error {
165 data := StateEntry{CheckedForUpdateAt: t, LatestRelease: r}

Callers 3

CheckForExtensionUpdateFunction · 0.85
CheckForUpdateFunction · 0.85

Calls

no outgoing calls

Tested by 1