search: add more test cases
main: fix code

Using bufio.Scanner instead of fmt.Scanf.