INNER CODE UNIT · Go
func
Netflix/go-expect · expect_opt.go:70
func (eo ExpectOpts) Match(v interface{}) Matcher {
for _, matcher := range eo.Matchers {
if matcher.Match(v) {
return matcher
}
}
return nil
}
// CallbackMatcher is a matcher that provides a Callback function.
type CallbackMatcher interface {
// Callback executes the matcher's callback with the content buffer at the
// time of match.
Callback(buf *bytes.Buffer) error
}
// Matcher provides an interface for finding a match in content read from
// Console's tty.