gilo/terminal/io.go
Timothy J. Warren 6cdb658d43
Some checks failed
timw4mail/gilo/pipeline/head There was a failure building this commit
Simplify package paths
2021-04-07 13:10:40 -04:00

24 lines
276 B
Go

package terminal
import (
"bufio"
"fmt"
"os"
)
var reader = bufio.NewReader(os.Stdin)
func ReadKey() (rune, int) {
ch, size, err := reader.ReadRune()
if err != nil {
panic(err)
}
return ch, size
}
// Print string to stdout
func Write(s string) {
fmt.Print(s)
}