Hey fellow gophers,
I'm currently working on a CLI application which does searching in files.
But now I need to ask for input from the user (search term in the application) and after that the application will spit out the content based on the search term. But on every new letter inserted in the prompt I want the terminal output to be updated (without the user pressing enter). I'm not sure if it is possible to do without using any specific (term) library's. Fmt.Scanf() seems to not work in this case
I hope anyone has a suggestion for me.
Happy programming all!!
评论:
dgryski:
Check out https://github.com/junegunn/fzf or https://github.com/peco/peco for how they work. It sounds like what you want is similar.
