Skip to content

Commit 9ea9bff

Browse files
committed
Remove unused code
1 parent 1bff2f1 commit 9ea9bff

File tree

2 files changed

+0
-34
lines changed

2 files changed

+0
-34
lines changed

expect/console.go

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,6 @@ func NewConsole(opts ...ConsoleOpt) (*Console, error) {
145145
closers: closers,
146146
}
147147

148-
/*for _, stdin := range options.Stdins {
149-
go func(stdin io.Reader) {
150-
_, err := io.Copy(c, stdin)
151-
if err != nil {
152-
c.Logf("failed to copy stdin: %s", err)
153-
}
154-
}(stdin)
155-
}*/
156-
157148
return c, nil
158149
}
159150

@@ -167,23 +158,6 @@ func (c *Console) OutTty() *os.File {
167158
return c.pty.OutPipe()
168159
}
169160

170-
// Read reads bytes b from Console's tty.
171-
/*func (c *Console) Read(b []byte) (int, error) {
172-
return c.ptm.Read(b)
173-
}*/
174-
175-
// Write writes bytes b to Console's tty.
176-
/*func (c *Console) Write(b []byte) (int, error) {
177-
c.Logf("console write: %q", b)
178-
return c.ptm.Write(b)
179-
}*/
180-
181-
// Fd returns Console's file descripting referencing the master part of its
182-
// pty.
183-
/*func (c *Console) Fd() uintptr {
184-
return c.ptm.Fd()
185-
}*/
186-
187161
// Close closes Console's tty. Calling Close will unblock Expect and ExpectEOF.
188162
func (c *Console) Close() error {
189163
for _, fd := range c.closers {

expect/expect_opt.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@ import (
2727
// ExpectOpt allows settings Expect options.
2828
type ExpectOpt func(*ExpectOpts) error
2929

30-
// WithTimeout sets a read timeout for an Expect statement.
31-
func WithTimeout(timeout time.Duration) ExpectOpt {
32-
return func(opts *ExpectOpts) error {
33-
opts.ReadTimeout = &timeout
34-
return nil
35-
}
36-
}
37-
3830
// ConsoleCallback is a callback function to execute if a match is found for
3931
// the chained matcher.
4032
type ConsoleCallback func(buf *bytes.Buffer) error

0 commit comments

Comments
 (0)