MCPcopy Create free account
hub / github.com/e6a5/flow / LoadSession

Function LoadSession

core/session.go:107–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105}
106
107func LoadSession() (Session, error) {
108 var session Session
109 path, err := GetSessionPath()
110 if err != nil {
111 return session, err
112 }
113 data, err := os.ReadFile(path)
114 if err != nil {
115 return session, err
116 }
117 err = json.Unmarshal(data, &session)
118 return session, err
119}
120
121func SaveSession(session Session) error {
122 path, err := GetSessionPath()

Callers 10

canStartNewSessionFunction · 0.92
start.goFile · 0.92
status.goFile · 0.92
resume.goFile · 0.92
end.goFile · 0.92
pause.goFile · 0.92
TestSessionPersistenceFunction · 0.85
getCurrentSessionStateFunction · 0.85
TestSaveLoadSessionFunction · 0.85

Calls 1

GetSessionPathFunction · 0.85

Tested by 5

canStartNewSessionFunction · 0.74
TestSessionPersistenceFunction · 0.68
getCurrentSessionStateFunction · 0.68
TestSaveLoadSessionFunction · 0.68