refactor: path-searcher to remove superflous code

This commit is contained in:
Inanc Gumus
2018-11-09 13:35:57 +03:00
parent 9b4dce0e87
commit d25082a63a

View File

@ -31,15 +31,9 @@ func main() {
query := os.Args[1:]
for _, q := range query {
search:
for i, w := range words {
q, w = strings.ToLower(q), strings.ToLower(w)
switch q {
case "and", "or", "the":
break search
}
if strings.Index(w, q) != notFound {
fmt.Printf("#%-2d: %q\n", i+1, w)
}