src/client/pkg/require/require.go
func Matches(tb testing.TB, expectedMatch string, actual string, msgAndArgs ...interface{}) {
	tb.Helper()
	r, err := regexp.Compile(expectedMatch)
	if err != nil {
		fatal(tb, msgAndArgs, "Match string provided (%v) is invalid", expectedMatch)
	}
	if !r.MatchString(actual) {
		fatal(tb, msgAndArgs, "Actual string (%v) does not match pattern (%v)", actual, expectedMatch)
	}
}
func Matches(tb testing.TB, expectedMatch string, actual string, msgAndArgs ...interface{}) {
	tb.Helper()
	r, err := regexp.Compile(expectedMatch)
	if err != nil {
		fatal(tb, msgAndArgs, "Match string provided (%v) is invalid", expectedMatch)
	}
	if !r.MatchString(actual) {
		fatal(tb, msgAndArgs, "Actual string (%v) does not match pattern (%v)", actual, expectedMatch)
	}
}
func Matches ( tb testing . TB , expectedMatch string , actual string , msgAndArgs ... interface { } ) { tb . Helper ( ) r , err := regexp . Compile ( expectedMatch ) if err != nil { fatal ( tb , msgAndArgs , " " , expectedMatch ) } if ! r . MatchString ( actual ) { fatal ( tb , msgAndArgs , " " , actual , expectedMatch ) } }
// Matches checks that a string matches a regular-expression.
Matches checks that a string matches a regular - expression .