pty:Go的PTY界面

时间:2021-02-03 14:19:17
【文件属性】:
文件名称:pty:Go的PTY界面
文件大小:18KB
文件格式:ZIP
更新时间:2021-02-03 14:19:17
go cross-platform tty pty GoGo ty Pty是使用unix伪终端的Go软件包。 安装 go get github.com/creack/pty 例 命令 package main import ( "io" "os" "os/exec" "github.com/creack/pty" ) 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 ) } 贝壳 package main import (
【文件预览】:
pty-master
----mktypes.bash(329B)
----ztypes_386.go(118B)
----pty_freebsd.go(2KB)
----.gitignore(27B)
----go.mod(39B)
----doc.go(349B)
----test_crosscompile.sh(1KB)
----Dockerfile.riscv(490B)
----pty_darwin.go(1KB)
----pty_unsupported.go(175B)
----ztypes_openbsd_32bit_int.go(164B)
----ztypes_s390x.go(135B)
----types_freebsd.go(210B)
----ztypes_freebsd_amd64.go(202B)
----ztypes_dragonfly_amd64.go(205B)
----ztypes_amd64.go(118B)
----ztypes_arm64.go(135B)
----types_openbsd.go(169B)
----LICENSE(1KB)
----ztypes_riscvx.go(154B)
----ztypes_freebsd_arm64.go(182B)
----ztypes_mipsx.go(173B)
----README.md(2KB)
----util.go(1KB)
----util_solaris.go(1KB)
----ztypes_ppc64le.go(137B)
----ztypes_freebsd_arm.go(171B)
----pty_solaris.go(3KB)
----ioctl_bsd.go(1KB)
----pty_openbsd.go(773B)
----pty_dragonfly.go(2KB)
----ioctl_solaris.go(630B)
----pty_linux.go(1004B)
----types_dragonfly.go(248B)
----ioctl.go(203B)
----run.go(2KB)
----types.go(83B)
----ztypes_arm.go(118B)
----ztypes_ppc64.go(135B)
----ztypes_freebsd_386.go(171B)

网友评论