This is cool piece. It will great if the following global variables can be moved to Terminal struct:
var (
InputFD int = unix.Stdin
Input io.Reader = os.Stdin
Output io.Writer = os.Stdout
)
I'm running this library with a few off screen terminal emulators, global variables doesn't work for me.