commit | 9cf8a72e81a709f6bb57501edcb9de6bcfa6de64 | [log] [tgz] |
---|---|---|
author | Yohei Ueda <yohei@jp.ibm.com> | Thu Dec 04 22:21:03 2014 +0900 |
committer | Yohei Ueda <yohei@jp.ibm.com> | Thu Dec 04 22:21:03 2014 +0900 |
tree | a03475da4038b1ee6eda69672dc75cb76b39d1f6 | |
parent | e615e17b3e9ec7216b4f069b42430da8a42edd8b [diff] |
Remove uintptr(...) Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
Pty is a Go package for using unix pseudo-terminals.
go get github.com/kr/pty
package main import ( "github.com/kr/pty" "io" "os" "os/exec" ) func main() { c := exec.Command("grep", "--color=auto", "bar") f, err := pty.Start(c) if err != nil { panic(err) } go func() { f.Write([]byte("foo\n")) f.Write([]byte("bar\n")) f.Write([]byte("baz\n")) f.Write([]byte{4}) // EOT }() io.Copy(os.Stdout, f) }