commit | ddf5c800837240576df279a1fa0edd84244cb7ae | [log] [tgz] |
---|---|---|
author | Renovate Bot <bot@renovateapp.com> | Thu Jan 09 11:39:41 2020 |
committer | Renovate Bot <bot@renovateapp.com> | Thu Jan 09 11:39:41 2020 |
tree | a7c20f3dcd8feda5e3d1945f0bfbd113cc16fa53 | |
parent | 8ae152e3c73f2cee236a5fa15eb17cfbaae0ad77 [diff] |
Update module mattn/go-runewidth to v0.0.7
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)