INNER CODE UNIT · Go
func
Netflix/go-expect · expect.go:28
func (c *Console) Expectf(format string, args ...interface{}) (string, error) {
return c.Expect(String(fmt.Sprintf(format, args...)))
}
// ExpectString reads from Console's tty until the provided string is read or
// an error occurs, and returns the buffer read by Console.
func (c *Console) ExpectString(s string) (string, error) {
return c.Expect(String(s))
}
// ExpectEOF reads from Console's tty until EOF or an error occurs, and returns
// the buffer read by Console. We also treat the PTSClosed error as an EOF.
func (c *Console) ExpectEOF() (string, error) {
return c.Expect(EOF, PTSClosed)
}
// Expect reads from Console's tty until a condition specified from opts is
// encountered or an error occurs, and returns the buffer read by console.