store: add ErrResourceDoesNotExist and update memory implementation

This commit is contained in:
Leo Balduf
2016-05-01 17:56:07 -04:00
parent a081e5195b
commit 468eefee57
10 changed files with 81 additions and 29 deletions
+4
View File
@@ -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