Skip to content

Commit

Permalink
Use the upstrea creack/pty instead of my own fork
Browse files Browse the repository at this point in the history
In the meantime they added a Setsize function which seems to do the same
thing as I was doing.
  • Loading branch information
elisescu committed Nov 25, 2022
1 parent ef39dfc commit e0292cb
Show file tree
Hide file tree
Showing 42 changed files with 642 additions and 163 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/elisescu/tty-share
go 1.18

require (
github.com/elisescu/pty v1.0.2
github.com/creack/pty v1.1.11
github.com/gorilla/mux v1.8.0
github.com/gorilla/websocket v1.5.0
github.com/hashicorp/yamux v0.1.1
Expand Down
3 changes: 1 addition & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8=
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw=
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/elisescu/pty v1.0.2 h1:I/wkN5bnPyh00j/bnNAy8wll8yvd8wRLUjPnmcmYI+Q=
github.com/elisescu/pty v1.0.2/go.mod h1:tzLUboZf84k7sFZdd2cOvhr/fSxMABV0UTMxnF25R/Y=
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
Expand Down
8 changes: 6 additions & 2 deletions pty_master.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"syscall"
"time"

ptyDevice "github.com/elisescu/pty"
ptyDevice "github.com/creack/pty"
log "github.com/sirupsen/logrus"
"golang.org/x/crypto/ssh/terminal"
)
Expand Down Expand Up @@ -101,7 +101,11 @@ func (pty *ptyMaster) Read(b []byte) (int, error) {
}

func (pty *ptyMaster) SetWinSize(rows, cols int) {
ptyDevice.Setsize(pty.ptyFile, rows, cols)
winSize := ptyDevice.Winsize{
Rows: uint16(rows),
Cols: uint16(cols),
}
ptyDevice.Setsize(pty.ptyFile, &winSize)
}

func (pty *ptyMaster) Refresh() {
Expand Down
File renamed without changes.
14 changes: 14 additions & 0 deletions vendor/github.com/creack/pty/Dockerfile.riscv

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
100 changes: 100 additions & 0 deletions vendor/github.com/creack/pty/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
30 changes: 30 additions & 0 deletions vendor/github.com/creack/pty/ioctl_solaris.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions vendor/github.com/creack/pty/pty_openbsd.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e0292cb

Please sign in to comment.