I want to my app shows:
press any key to exit ...
And when I pressed any key, it exits.
How can I achieve this?
termbox-go is a light-weight Go-native package which offers some rudimentary terminal control. Including the ability to get input in raw mode (read one character at a time without the default line-buffered behaviour).
It also has fairly ok compatibility across different systems.
And keyboard extends termbox-go to give some additional keyboard functionality like multi-key shortcuts and sequences.