pty_unix.go

 1//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
 2// +build darwin dragonfly freebsd linux netbsd openbsd solaris
 3
 4package ssh
 5
 6import (
 7	"os"
 8
 9	"github.com/aymanbagabas/go-pty"
10)
11
12func ptyNew(p pty.Pty) (in *os.File, out *os.File, er *os.File, err error) { // nolint
13	tty := p.(pty.UnixPty)
14	in = tty.Slave()
15	out = tty.Slave()
16	er = tty.Slave()
17	return
18}