diff --git a/badger/badger.go b/badger/badger.go index c0dbdcb2..839b54be 100644 --- a/badger/badger.go +++ b/badger/badger.go @@ -18,6 +18,7 @@ type Storage struct { // ErrNotFound means that a get call did not find the requested key. var ErrNotFound = errors.New("key not found") +var ErrKeyNotExist = ErrNotFound // New creates a new memory storage func New(config ...Config) *Storage { diff --git a/dynamodb/dynamodb.go b/dynamodb/dynamodb.go index 0692938a..8ab98ab2 100644 --- a/dynamodb/dynamodb.go +++ b/dynamodb/dynamodb.go @@ -21,6 +21,7 @@ type Storage struct { // ErrNotFound means that a get call did not find the requested key. var ErrNotFound = errors.New("key not found") +var ErrKeyNotExist = ErrNotFound // New creates a new storage func New(config Config) *Storage { diff --git a/memcache/memcache.go b/memcache/memcache.go index a30d7163..184992f3 100644 --- a/memcache/memcache.go +++ b/memcache/memcache.go @@ -19,6 +19,7 @@ type Storage struct { // ErrNotFound means that a get call did not find the requested key. var ErrNotFound = errors.New("key not found") +var ErrKeyNotExist = ErrNotFound // New creates a new storage func New(config ...Config) *Storage { diff --git a/memory/memory.go b/memory/memory.go index 7c434fd3..f4c118d9 100644 --- a/memory/memory.go +++ b/memory/memory.go @@ -17,6 +17,7 @@ type Storage struct { // ErrNotFound means that a get call did not find the requested key. var ErrNotFound = errors.New("key not found") +var ErrKeyNotExist = ErrNotFound type entry struct { data []byte diff --git a/mongodb/mongodb.go b/mongodb/mongodb.go index 398f4552..ee89e5f2 100644 --- a/mongodb/mongodb.go +++ b/mongodb/mongodb.go @@ -24,6 +24,7 @@ type Storage struct { // ErrNotFound means that a get call did not find the requested key. var ErrNotFound = errors.New("key not found") +var ErrKeyNotExist = ErrNotFound type item struct { ObjectID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"` diff --git a/mysql/mysql.go b/mysql/mysql.go index c69f06bc..9972fff6 100644 --- a/mysql/mysql.go +++ b/mysql/mysql.go @@ -26,6 +26,7 @@ type Storage struct { // ErrNotFound means that a get call did not find the requested key. var ErrNotFound = errors.New("key not found") +var ErrKeyNotExist = ErrNotFound var ( dropQuery = "DROP TABLE IF EXISTS %s;" diff --git a/postgres/postgres.go b/postgres/postgres.go index ab4f5b64..db0d3f97 100644 --- a/postgres/postgres.go +++ b/postgres/postgres.go @@ -24,9 +24,9 @@ type Storage struct { sqlGC string } - // ErrNotFound means that a get call did not find the requested key. var ErrNotFound = errors.New("key not found") +var ErrKeyNotExist = ErrNotFound var ( dropQuery = `DROP TABLE IF EXISTS %s;` diff --git a/redis/redis.go b/redis/redis.go index e801d03b..3ce9ac9b 100644 --- a/redis/redis.go +++ b/redis/redis.go @@ -16,6 +16,7 @@ type Storage struct { // ErrNotFound means that a get call did not find the requested key. var ErrNotFound = errors.New("key not found") +var ErrKeyNotExist = ErrNotFound // New creates a new redis storage func New(config ...Config) *Storage { diff --git a/sqlite3/sqlite3.go b/sqlite3/sqlite3.go index 8c3e3d1a..c4ef6d93 100644 --- a/sqlite3/sqlite3.go +++ b/sqlite3/sqlite3.go @@ -26,6 +26,7 @@ type Storage struct { // ErrNotFound means that a get call did not find the requested key. var ErrNotFound = errors.New("key not found") +var ErrKeyNotExist = ErrNotFound var ( dropQuery = `DROP TABLE IF EXISTS %s;`