@@ -57,8 +57,8 @@ type WithFlags interface {
57
57
EchoEnabled () (bool ,error )
58
58
}
59
59
60
- //PTYOptions represents a an option for a PTY.
61
- type PTYOption func (* ptyOptions )
60
+ //Options represents a an option for a PTY.
61
+ type Option func (* ptyOptions )
62
62
63
63
type ptyOptions struct {
64
64
logger * log.Logger
@@ -68,21 +68,21 @@ type ptyOptions struct {
68
68
// WithSSHRequest applies the ssh.Pty request to the PTY.
69
69
//
70
70
// Only partially supported on Windows (e.g. window size).
71
- func WithSSHRequest (req ssh.Pty )PTYOption {
71
+ func WithSSHRequest (req ssh.Pty )Option {
72
72
return func (opts * ptyOptions ) {
73
73
opts .sshReq = & req
74
74
}
75
75
}
76
76
77
77
// WithLogger sets a logger for logging errors.
78
- func WithLogger (logger * log.Logger )PTYOption {
78
+ func WithLogger (logger * log.Logger )Option {
79
79
return func (opts * ptyOptions ) {
80
80
opts .logger = logger
81
81
}
82
82
}
83
83
84
84
// New constructs a new Pty.
85
- func New (opts ... PTYOption ) (PTY ,error ) {
85
+ func New (opts ... Option ) (PTY ,error ) {
86
86
return newPty (opts ... )
87
87
}
88
88