File tree Expand file tree Collapse file tree 4 files changed +7
-4
lines changed
Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ require (
3333 golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897
3434 golang.org/x/sync v0.0.0-20190423024810-112230192c58
3535 golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44
36+ golang.org/x/term v0.0.0-20210422114643-f5beecf764ed
3637 golang.org/x/text v0.3.4 // indirect
3738 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
3839)
Original file line number Diff line number Diff line change @@ -357,6 +357,8 @@ golang.org/x/sys v0.0.0-20210319071255-635bc2c9138d/go.mod h1:h1NjWce9XRLGQEsW7w
357357golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44 h1:Bli41pIlzTzf3KEY06n+xnzK/BESIg2ze4Pgfh/aI8c =
358358golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44 /go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs =
359359golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 /go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo =
360+ golang.org/x/term v0.0.0-20210422114643-f5beecf764ed h1:Ei4bQjjpYUsS4efOUz+5Nz++IVkHk87n2zBA0NxBWc0 =
361+ golang.org/x/term v0.0.0-20210422114643-f5beecf764ed /go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo =
360362golang.org/x/text v0.3.0 /go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ =
361363golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 /go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ =
362364golang.org/x/text v0.3.2 /go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk =
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import (
1717 "github.com/mattn/go-colorable"
1818 "github.com/mattn/go-isatty"
1919 "github.com/muesli/termenv"
20- "golang.org/x/crypto/ssh/terminal "
20+ "golang.org/x/term "
2121)
2222
2323type IOStreams struct {
@@ -332,7 +332,7 @@ func isCygwinTerminal(w io.Writer) bool {
332332
333333func terminalSize (w io.Writer ) (int , int , error ) {
334334 if f , isFile := w .(* os.File ); isFile {
335- return terminal .GetSize (int (f .Fd ()))
335+ return term .GetSize (int (f .Fd ()))
336336 }
337337 return 0 , 0 , fmt .Errorf ("%v is not a file" , w )
338338}
Original file line number Diff line number Diff line change 55 "os"
66
77 "github.com/mattn/go-isatty"
8- "golang.org/x/crypto/ssh/terminal "
8+ "golang.org/x/term "
99)
1010
1111var IsTerminal = func (f * os.File ) bool {
@@ -18,7 +18,7 @@ func IsCygwinTerminal(f *os.File) bool {
1818
1919var TerminalSize = func (w interface {}) (int , int , error ) {
2020 if f , isFile := w .(* os.File ); isFile {
21- return terminal .GetSize (int (f .Fd ()))
21+ return term .GetSize (int (f .Fd ()))
2222 }
2323
2424 return 0 , 0 , fmt .Errorf ("%v is not a file" , w )
You can’t perform that action at this time.
0 commit comments