MCPcopy
hub / github.com/gofiber/fiber / DeleteWithContext

Method DeleteWithContext

middleware/cache/cache_test.go:164–172  ·  view source on GitHub ↗
(_ context.Context, key string)

Source from the content-addressed store, hash-verified

162}
163
164func (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
174func (s *failingCacheStorage) Delete(key string) error {
175 return s.DeleteWithContext(context.Background(), key)

Callers 1

DeleteMethod · 0.95

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected