commit | 7a543c8bf642969b4b225984bfa7d88a0b737a11 | [log] [tgz] |
---|---|---|
author | Guillaume J. Charmes <guillaume@charmes.net> | Sun Feb 09 04:30:15 2014 -0800 |
committer | Keith Rarick <kr@xph.us> | Mon Mar 03 21:23:38 2014 -0800 |
tree | 14b519e5292b73b96448e436488cfd0d1a5bbae6 | |
parent | 76284c52ce4793067f046646ef9dd58a39e68846 [diff] |
Add pty_unsupported.go file in order to allow projects to import the package and still compile on other os/arch
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) }