MCPcopy
hub / github.com/GopeedLab/gopeed / Load

Method Load

internal/protocol/ed2k/fetcher.go:24–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22}
23
24func (s *clientStateStore) Load() (*goed2k.ClientState, error) {
25 if s == nil || s.store == nil {
26 return nil, nil
27 }
28 var state goed2k.ClientState
29 exist, err := s.store.Load(&state)
30 if err != nil {
31 return nil, err
32 }
33 if !exist {
34 return nil, nil
35 }
36 return &state, nil
37}
38
39func (s *clientStateStore) Save(state *goed2k.ClientState) error {
40 if s == nil || s.store == nil {

Callers

nothing calls this directly

Calls 1

LoadMethod · 0.65

Tested by

no test coverage detected