MCPcopy Create free account
hub / github.com/git-bug/git-bug / load

Method load

api/graphql/models/lazy_identity.go:43–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41}
42
43func (li *lazyIdentity) load() (*cache.IdentityCache, error) {
44 li.mu.Lock()
45 defer li.mu.Unlock()
46
47 if li.id != nil {
48 return li.id, nil
49 }
50
51 id, err := li.cache.Identities().Resolve(li.excerpt.Id())
52 if err != nil {
53 return nil, fmt.Errorf("cache: missing identity %v", li.excerpt.Id())
54 }
55 li.id = id
56 return id, nil
57}
58
59func (li *lazyIdentity) Id() entity.Id {
60 return li.excerpt.Id()

Callers 5

EmailMethod · 0.95
LoginMethod · 0.95
AvatarUrlMethod · 0.95
KeysMethod · 0.95
IsProtectedMethod · 0.95

Calls 5

IdentitiesMethod · 0.80
ErrorfMethod · 0.80
LockMethod · 0.65
ResolveMethod · 0.65
IdMethod · 0.65

Tested by

no test coverage detected