mirror of
https://github.com/1f349/qpty.git
synced 2024-12-22 07:14:05 +00:00
Remove hex output
This commit is contained in:
parent
c6685100b2
commit
d504678d6f
9
qpty.go
9
qpty.go
@ -2,7 +2,6 @@ package qpty
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/hex"
|
|
||||||
"github.com/creack/pty"
|
"github.com/creack/pty"
|
||||||
"github.com/fsouza/go-dockerclient"
|
"github.com/fsouza/go-dockerclient"
|
||||||
"io"
|
"io"
|
||||||
@ -66,14 +65,6 @@ func (q *Qpty) Run(shell string) error {
|
|||||||
_, _ = io.Copy(q.tty, q.or)
|
_, _ = io.Copy(q.tty, q.or)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
go func() {
|
|
||||||
r, w := io.Pipe()
|
|
||||||
go func() {
|
|
||||||
_, _ = io.Copy(hex.NewEncoder(w), q.pty)
|
|
||||||
}()
|
|
||||||
_, _ = io.Copy(os.Stdout, r)
|
|
||||||
}()
|
|
||||||
|
|
||||||
return q.dock.StartExec(execInst.ID, docker.StartExecOptions{
|
return q.dock.StartExec(execInst.ID, docker.StartExecOptions{
|
||||||
InputStream: q.ir,
|
InputStream: q.ir,
|
||||||
OutputStream: q.ow,
|
OutputStream: q.ow,
|
||||||
|
Loading…
Reference in New Issue
Block a user