INNER CODE UNIT · Go
Error
Netflix/go-expect · expect_opt.go:287
func Error(errs ...error) ExpectOpt {
return func(opts *ExpectOpts) error {
for _, err := range errs {
opts.Matchers = append(opts.Matchers, &errorMatcher{
err: err,
})
}
return nil
}
}
// EOF adds an Expect condition to exit if io.EOF is returned from reading
// Console's tty.
func EOF(opts *ExpectOpts) error {
return Error(io.EOF)(opts)
}
// PTSClosed adds an Expect condition to exit if we get an