gilo/internal/terminal/io.go
Timothy J. Warren 554012eb52
All checks were successful
timw4mail/gilo/pipeline/head This commit looks good
Update search prompt, fix some buggy output formatting
2021-04-06 16:44:59 -04:00

25 lines
277 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)
}