From a5e38222c552492e6716ee47fa573b25a67c1dc7 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Wed, 29 Jul 2020 20:51:55 -0400 Subject: [PATCH] Don't expose ReadInput --- key.go | 4 ++-- tea.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/key.go b/key.go index c83f1a8..54c84fd 100644 --- a/key.go +++ b/key.go @@ -262,9 +262,9 @@ var hexes = map[string]Key{ "1b5b313b3344": {Type: KeyLeft, Alt: true}, } -// ReadInput reads keypress and mouse input from a TTY and returns a message +// readInput reads keypress and mouse input from a TTY and returns a message // containing information about the key or mouse event accordingly -func ReadInput(r io.Reader) (Msg, error) { +func readInput(r io.Reader) (Msg, error) { var buf [256]byte // Read and block diff --git a/tea.go b/tea.go index 9ff8ee3..d5a1340 100644 --- a/tea.go +++ b/tea.go @@ -133,7 +133,7 @@ func (p *Program) Start() error { // Subscribe to user input go func() { for { - msg, err := ReadInput(os.Stdin) + msg, err := readInput(os.Stdin) if err != nil { errs <- err }