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

Function getStateEntry

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

Source from the content-addressed store, hash-verified

79}
80
81func getStateEntry(stateFilePath string) (*StateEntry, error) {
82 content, err := os.ReadFile(stateFilePath)
83 if err != nil {
84 return nil, err
85 }
86
87 var stateEntry StateEntry
88 err = yaml.Unmarshal(content, &stateEntry)
89 if err != nil {
90 return nil, err
91 }
92
93 return &stateEntry, nil
94}
95
96func setStateEntry(stateFilePath string, t time.Time, r ReleaseInfo) error {
97 data := StateEntry{CheckedForUpdateAt: t, LatestRelease: r}

Callers 1

CheckForUpdateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected