mirror of
https://github.com/sot-tech/mochi.git
synced 2026-06-29 21:52:07 -07:00
store: add ErrResourceDoesNotExist and update memory implementation
This commit is contained in:
@@ -51,6 +51,10 @@ func (ss *stringStore) RemoveString(s string) error {
|
||||
ss.Lock()
|
||||
defer ss.Unlock()
|
||||
|
||||
if _, ok := ss.strings[s]; !ok {
|
||||
return store.ErrResourceDoesNotExist
|
||||
}
|
||||
|
||||
delete(ss.strings, s)
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user