-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add delete-db suggestions (#74)
* feat: add suggestions * refactor: getDbs returns formatted db names * feat: add levenshtein and prefix suggestions * feat: add getFilePath helper * refactor: use custom error for dbNotFound * fix: returning empty suggestions for non '@' db names * test: check errors for findDbs * refactor: don't cast type to check custom error * refactor: rename dbNotFoundErr to suggestionNotFoundErr * fix: use errors.As to check types * fix: handle other errors Co-authored-by: Carlos Alexandro Becker <[email protected]> * refactor: prefix with err to match stdlib * chore(lint): please the almighty linters * fix(test): create a temp dir for testing * fix(test): use Charm's testserver for tests * chore(docs): improve findDb godoc * fix: base levenshtein on word lengths * fix(test): compare suggestions --------- Co-authored-by: Carlos Alexandro Becker <[email protected]>
- Loading branch information
Showing
4 changed files
with
269 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.