summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi/terminal/terminal.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2021-02-25 09:25:28 -0600
committerbaude <bbaude@redhat.com>2021-02-25 10:02:41 -0600
commit24d9bda7ff8a3e6a9f249401e05e35e73284ae61 (patch)
tree6777cc2c23306d1a6b87ef40b9fe4eab2764b7dd /pkg/domain/infra/abi/terminal/terminal.go
parent9ec8106841c55bc085012727748e2d73826be97d (diff)
downloadpodman-24d9bda7ff8a3e6a9f249401e05e35e73284ae61.tar.gz
podman-24d9bda7ff8a3e6a9f249401e05e35e73284ae61.tar.bz2
podman-24d9bda7ff8a3e6a9f249401e05e35e73284ae61.zip
prune remotecommand dependency
prune a dependency that was only being used for a simple struct. Should correct checksum issue on tarballs [NO TESTS NEEDED] Fixes: #9355 Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/domain/infra/abi/terminal/terminal.go')
-rw-r--r--pkg/domain/infra/abi/terminal/terminal.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/domain/infra/abi/terminal/terminal.go b/pkg/domain/infra/abi/terminal/terminal.go
index 26a692a7f..067c0c08e 100644
--- a/pkg/domain/infra/abi/terminal/terminal.go
+++ b/pkg/domain/infra/abi/terminal/terminal.go
@@ -5,11 +5,11 @@ import (
"os"
"os/signal"
+ "github.com/containers/podman/v3/libpod/define"
lsignal "github.com/containers/podman/v3/pkg/signal"
"github.com/moby/term"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
- "k8s.io/client-go/tools/remotecommand"
)
// RawTtyFormatter ...
@@ -18,20 +18,20 @@ type RawTtyFormatter struct {
// getResize returns a TerminalSize command matching stdin's current
// size on success, and nil on errors.
-func getResize() *remotecommand.TerminalSize {
+func getResize() *define.TerminalSize {
winsize, err := term.GetWinsize(os.Stdin.Fd())
if err != nil {
logrus.Warnf("Could not get terminal size %v", err)
return nil
}
- return &remotecommand.TerminalSize{
+ return &define.TerminalSize{
Width: winsize.Width,
Height: winsize.Height,
}
}
// Helper for prepareAttach - set up a goroutine to generate terminal resize events
-func resizeTty(ctx context.Context, resize chan remotecommand.TerminalSize) {
+func resizeTty(ctx context.Context, resize chan define.TerminalSize) {
sigchan := make(chan os.Signal, 1)
signal.Notify(sigchan, lsignal.SIGWINCH)
go func() {
@@ -78,7 +78,7 @@ func (f *RawTtyFormatter) Format(entry *logrus.Entry) ([]byte, error) {
return bytes, err
}
-func handleTerminalAttach(ctx context.Context, resize chan remotecommand.TerminalSize) (context.CancelFunc, *term.State, error) {
+func handleTerminalAttach(ctx context.Context, resize chan define.TerminalSize) (context.CancelFunc, *term.State, error) {
logrus.Debugf("Handling terminal attach")
subCtx, cancel := context.WithCancel(ctx)