ConsoleParser is an interface to abstract input layer.
| 10 | |
| 11 | // ConsoleParser is an interface to abstract input layer. |
| 12 | type ConsoleParser interface { |
| 13 | // Setup should be called before starting input |
| 14 | Setup() error |
| 15 | // TearDown should be called after stopping input |
| 16 | TearDown() error |
| 17 | // GetWinSize returns WinSize object to represent width and height of terminal. |
| 18 | GetWinSize() *WinSize |
| 19 | // Read returns byte array. |
| 20 | Read() ([]byte, error) |
| 21 | } |
| 22 | |
| 23 | // GetKey returns Key correspond to input byte codes. |
| 24 | func GetKey(b []byte) Key { |
no outgoing calls
no test coverage detected
searching dependent graphs…