commit | 50a5f44796b8f2013b369f4c5acabef50b3cf87e | [log] [tgz] |
---|---|---|
author | Renovate Bot <[email protected]> | Tue Jan 21 17:47:29 2020 |
committer | Renovate Bot <[email protected]> | Tue Jan 21 17:47:29 2020 |
tree | b75f5be999b2b8beb872c7a890ae5f2017a2be04 | |
parent | 3f926a37f4779c2f1e8504a50e15cf531ce7e2e2 [diff] |
Update module mattn/go-isatty to v0.0.12
Simple tty utility
tty, err := tty.Open() if err != nil { log.Fatal(err) } defer tty.Close() for { r, err := tty.ReadRune() if err != nil { log.Fatal(err) } // handle key event }
if you are on windows and want to display ANSI colors, use go-colorable.
tty, err := tty.Open()
if err != nil {
log.Fatal(err)
}
defer tty.Close()
out := colorable.NewColorable(tty.Output())
fmt.Fprintln(out, "\x1b[2J")
$ go get github.com/mattn/go-tty
MIT
Yasuhiro Matsumoto (a.k.a mattn)