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

Commite692a18

Browse files
committed
fix: Make linter happy
1 parent5fe2a25 commite692a18

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

‎pty/pty.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ type WithFlags interface {
5757
EchoEnabled() (bool,error)
5858
}
5959

60-
//PTYOptions represents a an option for a PTY.
61-
typePTYOptionfunc(*ptyOptions)
60+
//Options represents a an option for a PTY.
61+
typeOptionfunc(*ptyOptions)
6262

6363
typeptyOptionsstruct {
6464
logger*log.Logger
@@ -68,21 +68,21 @@ type ptyOptions struct {
6868
// WithSSHRequest applies the ssh.Pty request to the PTY.
6969
//
7070
// Only partially supported on Windows (e.g. window size).
71-
funcWithSSHRequest(req ssh.Pty)PTYOption {
71+
funcWithSSHRequest(req ssh.Pty)Option {
7272
returnfunc(opts*ptyOptions) {
7373
opts.sshReq=&req
7474
}
7575
}
7676

7777
// WithLogger sets a logger for logging errors.
78-
funcWithLogger(logger*log.Logger)PTYOption {
78+
funcWithLogger(logger*log.Logger)Option {
7979
returnfunc(opts*ptyOptions) {
8080
opts.logger=logger
8181
}
8282
}
8383

8484
// New constructs a new Pty.
85-
funcNew(opts...PTYOption) (PTY,error) {
85+
funcNew(opts...Option) (PTY,error) {
8686
returnnewPty(opts...)
8787
}
8888

‎pty/pty_other.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"golang.org/x/xerrors"
1515
)
1616

17-
funcnewPty(opt...PTYOption) (retPTY*otherPty,errerror) {
17+
funcnewPty(opt...Option) (retPTY*otherPty,errerror) {
1818
varoptsptyOptions
1919
for_,o:=rangeopt {
2020
o(&opts)

‎pty/ptytest/ptytest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"github.com/coder/coder/testutil"
2222
)
2323

24-
funcNew(t*testing.T,opts...pty.PTYOption)*PTY {
24+
funcNew(t*testing.T,opts...pty.Option)*PTY {
2525
t.Helper()
2626

2727
ptty,err:=pty.New(opts...)

‎pty/start.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import (
88
typeStartOptionfunc(*startOptions)
99

1010
typestartOptionsstruct {
11-
ptyOpts []PTYOption
11+
ptyOpts []Option
1212
}
1313

1414
// WithPTYOptions applies the given options to the underlying PTY.
15-
funcWithPTYOptions(opts...PTYOption)StartOption {
15+
funcWithPTYOptions(opts...Option)StartOption {
1616
returnfunc(o*startOptions) {
1717
o.ptyOpts=opts
1818
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp