From 7ff133c6860976d4137ad59d680748bb3ed34531 Mon Sep 17 00:00:00 2001 From: TheBoringDude Date: Fri, 28 May 2021 21:30:45 +0800 Subject: [PATCH] patch wrong store.{group} --- keys-query.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keys-query.go b/keys-query.go index ab3ccd8..72bbe9c 100644 --- a/keys-query.go +++ b/keys-query.go @@ -21,7 +21,7 @@ func (db *MiniDB) FindKey(key string) (string, error) { // FindCollection gets the key in the keys map and returns its corresponding filename. // It returns nil if it exists. func (db *MiniDB) FindCollection(key string) (string, error) { - filename, ok := db.store.Keys[key] + filename, ok := db.store.Collections[key] if !ok { return "", errors.New("the key does not exist") @@ -33,7 +33,7 @@ func (db *MiniDB) FindCollection(key string) (string, error) { // FindStore gets the key in the keys map and returns its corresponding filename. // It returns nil if it exists. func (db *MiniDB) FindStore(key string) (string, error) { - filename, ok := db.store.Keys[key] + filename, ok := db.store.Store[key] if !ok { return "", errors.New("the key does not exist")