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

Function getStateEntry

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

Source from the content-addressed store, hash-verified

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

Callers 3

CheckForExtensionUpdateFunction · 0.85
CheckForUpdateFunction · 0.85

Calls

no outgoing calls

Tested by 1