Update Search function to use strings.Contains function to find matching repos instead of comparing strings using github.com/lithammer/fuzzysearch/fuzzy.LevenshteinDistance.
Update TestSearch test function:
1 - remove irrelevant test cases, example: find: "" (empty string), the --find flag is required, so this case won't occur.
2 - update the pqDepth field in test cases, because the way Search function has changed, the results will be affected as well.
3 - add new test cases to cover more scenarios.
Update go.mod and go.sum files, since we are no longer relying on github.com/lithammer/fuzzysearch for searching, this module is no longer needed, so there is no need to include it in go.mod.
This PR addresses Issue #10.
Changes:
Search
function to usestrings.Contains
function to find matching repos instead of comparing strings usinggithub.com/lithammer/fuzzysearch/fuzzy.LevenshteinDistance
.TestSearch
test function: 1 - remove irrelevant test cases, example: find: "" (empty string), the--find
flag is required, so this case won't occur. 2 - update thepqDepth
field in test cases, because the waySearch
function has changed, the results will be affected as well. 3 - add new test cases to cover more scenarios.go.mod
andgo.sum
files, since we are no longer relying ongithub.com/lithammer/fuzzysearch
for searching, this module is no longer needed, so there is no need to include it ingo.mod
.