Skip to content

Commit

Permalink
patch wrong store.{group}
Browse files Browse the repository at this point in the history
  • Loading branch information
tbdsux committed May 28, 2021
1 parent 1f4e7e3 commit 7ff133c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keys-query.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand Down

0 comments on commit 7ff133c

Please sign in to comment.