INNER CODE UNIT · Go
String
Netflix/go-expect · expect_opt.go:244
func String(strs ...string) ExpectOpt {
return func(opts *ExpectOpts) error {
for _, str := range strs {
opts.Matchers = append(opts.Matchers, &stringMatcher{
str: str,
})
}
return nil
}
}
// Regexp adds an Expect condition to exit if the content read from Console's
// tty matches the given Regexp.
func Regexp(res ...*regexp.Regexp) ExpectOpt {
return func(opts *ExpectOpts) error {
for _, re := range res {
opts.Matchers = append(opts.Matchers, ®expMatcher{
re: re,