pkg/term

term: need windows support

Opened this issue · 3 comments

16b2e60 make term/termios a noop under windows, but the higher level term package is still POSIX specific.

The plan is to add a new low level package for windows, term/win32 (just an example, please don't flame) and adjust the term package to use it depending on the host GOOS.

bep commented

As to the noop, this package doesn't build on (my) Windows:

$ go get github.com/pkg/term
# github.com/pkg/term/termios
C:\Users\bep\go\src\github.com\pkg\term\termios\pty.go:25: undefined: ptsname
C:\Users\bep\go\src\github.com\pkg\term\termios\pty.go:30: undefined: grantpt
C:\Users\bep\go\src\github.com\pkg\term\termios\pty.go:35: undefined: unlockpt

Has anyone managed to solve it? Ty

+1 for Windows support