Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2a7ab08

Browse files
authored
fix: usegolang.org/x/term instead ofgolang.org/x/crypto/ssh/terminal (#837)
The latter is deprecated:https://pkg.go.dev/golang.org/x/crypto/ssh/terminal
1 parente9027b9 commit2a7ab08

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

‎cli/ssh.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ import (
1111
"github.com/pion/webrtc/v3"
1212
"github.com/spf13/cobra"
1313
gossh"golang.org/x/crypto/ssh"
14+
"golang.org/x/term"
1415
"golang.org/x/xerrors"
1516

16-
"golang.org/x/crypto/ssh/terminal"
17-
1817
"github.com/coder/coder/cli/cliflag"
1918
"github.com/coder/coder/cli/cliui"
2019
"github.com/coder/coder/coderd/database"
@@ -131,12 +130,12 @@ func ssh() *cobra.Command {
131130
}
132131

133132
ifisatty.IsTerminal(os.Stdout.Fd()) {
134-
state,err:=terminal.MakeRaw(int(os.Stdin.Fd()))
133+
state,err:=term.MakeRaw(int(os.Stdin.Fd()))
135134
iferr!=nil {
136135
returnerr
137136
}
138137
deferfunc() {
139-
_=terminal.Restore(int(os.Stdin.Fd()),state)
138+
_=term.Restore(int(os.Stdin.Fd()),state)
140139
}()
141140
}
142141

‎go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ require (
236236
go.opencensus.iov0.23.0// indirect
237237
golang.org/x/modv0.5.1// indirect
238238
golang.org/x/netv0.0.0-20220325170049-de3da57026de// indirect
239-
golang.org/x/termv0.0.0-20210927222741-03fcf44c2211// indirect
239+
golang.org/x/termv0.0.0-20210927222741-03fcf44c2211
240240
golang.org/x/textv0.3.7// indirect
241241
golang.org/x/timev0.0.0-20211116232009-f0f3c7e86c11// indirect
242242
golang.org/x/toolsv0.1.9// indirect

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp