rename
This commit is contained in:
@@ -12,10 +12,10 @@ import (
|
||||
"github.com/gliderlabs/ssh"
|
||||
"github.com/google/shlex"
|
||||
"github.com/kr/pty"
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
"golang.org/x/term"
|
||||
|
||||
"git.company.lan/gopkg/kong"
|
||||
"github.com/alecthomas/colour"
|
||||
"github.com/alecthomas/kong"
|
||||
)
|
||||
|
||||
// Handle a single SSH interactive connection.
|
||||
@@ -31,11 +31,11 @@ func handle(log *log.Logger, s ssh.Session) error {
|
||||
return err
|
||||
}
|
||||
defer tty.Close()
|
||||
state, err := terminal.GetState(int(cpty.Fd()))
|
||||
state, err := term.GetState(int(cpty.Fd()))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer terminal.Restore(int(cpty.Fd()), state)
|
||||
defer term.Restore(int(cpty.Fd()), state)
|
||||
|
||||
colour.Fprintln(tty, "^BWelcome!^R")
|
||||
go io.Copy(cpty, s)
|
||||
@@ -53,7 +53,7 @@ func handle(log *log.Logger, s ssh.Session) error {
|
||||
Stdin: tty,
|
||||
FuncOnWidthChanged: func(f func()) {},
|
||||
FuncMakeRaw: func() error {
|
||||
_, err := terminal.MakeRaw(int(cpty.Fd())) // nolint: govet
|
||||
_, err := term.MakeRaw(int(cpty.Fd())) // nolint: govet
|
||||
return err
|
||||
},
|
||||
FuncExitRaw: func() error { return nil },
|
||||
|
||||
Reference in New Issue
Block a user