Method
DeleteWithContext
(_ context.Context, key string)
Source from the content-addressed store, hash-verified
| 162 | } |
| 163 | |
| 164 | func (s *failingCacheStorage) DeleteWithContext(_ context.Context, key string) error { |
| 165 | s.mu.Lock() |
| 166 | defer s.mu.Unlock() |
| 167 | if err, ok := s.errs["del|"+key]; ok && err != nil { |
| 168 | return err |
| 169 | } |
| 170 | delete(s.data, key) |
| 171 | return nil |
| 172 | } |
| 173 | |
| 174 | func (s *failingCacheStorage) Delete(key string) error { |
| 175 | return s.DeleteWithContext(context.Background(), key) |
Tested by
no test coverage detected