Method
DeleteWithContext
(_ context.Context, key string)
Source from the content-addressed store, hash-verified
| 2615 | } |
| 2616 | |
| 2617 | func (s *flakySessionStorage) DeleteWithContext(_ context.Context, key string) error { |
| 2618 | s.mu.Lock() |
| 2619 | defer s.mu.Unlock() |
| 2620 | if s.failDel { |
| 2621 | return errors.New("delete failed") |
| 2622 | } |
| 2623 | delete(s.data, key) |
| 2624 | return nil |
| 2625 | } |
| 2626 | |
| 2627 | func (s *flakySessionStorage) Delete(key string) error { |
| 2628 | return s.DeleteWithContext(context.Background(), key) |
Tested by
no test coverage detected