()
| 41 | } |
| 42 | |
| 43 | func (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 | |
| 59 | func (li *lazyIdentity) Id() entity.Id { |
| 60 | return li.excerpt.Id() |
no test coverage detected