gobstore/delete.go

11 lines
180 B
Go
Raw Permalink Normal View History

2025-01-12 09:51:51 +00:00
package gobstore
// Delete removes a key if it exists
func (j *GobStore[T]) Delete(key string) {
j.Lock()
defer j.Unlock()
j.dirty = true
delete(j.values, key)
// j.save()
}