delete data from storage or memory
(ctx context.Context, key string)
| 68 | |
| 69 | // delete data from storage or memory |
| 70 | func (m *storageManager) delRaw(ctx context.Context, key string) error { |
| 71 | if m.storage != nil { |
| 72 | if err := m.storage.DeleteWithContext(ctx, key); err != nil { |
| 73 | return fmt.Errorf("csrf: failed to delete key %q: %w", m.logKey(key), err) |
| 74 | } |
| 75 | return nil |
| 76 | } |
| 77 | |
| 78 | m.memory.Delete(key) |
| 79 | return nil |
| 80 | } |
| 81 | |
| 82 | func (m *storageManager) logKey(key string) string { |
| 83 | if m.shouldRedactKeys { |