@@ -146,14 +146,14 @@ type outExpecter struct {
146
146
}
147
147
148
148
func (e * outExpecter ) ExpectMatch (str string ) string {
149
- return e .expectMatchContext (str , e .ExpectMatchContext )
149
+ return e .expectMatchContextFunc (str , e .ExpectMatchContext )
150
150
}
151
151
152
152
func (e * outExpecter ) ExpectRegexMatch (str string ) string {
153
- return e .expectMatchContext (str , e .ExpectRegexMatchContext )
153
+ return e .expectMatchContextFunc (str , e .ExpectRegexMatchContext )
154
154
}
155
155
156
- func (e * outExpecter ) expectMatchContext (str string , impl func (ctx context.Context , str string ) string ) string {
156
+ func (e * outExpecter ) expectMatchContextFunc (str string , impl func (ctx context.Context , str string ) string ) string {
157
157
e .t .Helper ()
158
158
159
159
timeout , cancel := context .WithTimeout (context .Background (), testutil .WaitMedium )
@@ -164,18 +164,18 @@ func (e *outExpecter) expectMatchContext(str string, impl func(ctx context.Conte
164
164
165
165
// TODO(mafredri): Rename this to ExpectMatch when refactoring.
166
166
func (e * outExpecter ) ExpectMatchContext (ctx context.Context , str string ) string {
167
- return e .expectMatcher (ctx , str , func (src , pattern string ) bool {
167
+ return e .expectMatcherFunc (ctx , str , func (src , pattern string ) bool {
168
168
return strings .Contains (src , pattern )
169
169
})
170
170
}
171
171
172
172
func (e * outExpecter ) ExpectRegexMatchContext (ctx context.Context , str string ) string {
173
- return e .expectMatcher (ctx , str , func (src , pattern string ) bool {
173
+ return e .expectMatcherFunc (ctx , str , func (src , pattern string ) bool {
174
174
return regexp .MustCompile (pattern ).MatchString (src )
175
175
})
176
176
}
177
177
178
- func (e * outExpecter ) expectMatcher (ctx context.Context , str string , matchFn func (src , pattern string ) bool ) string {
178
+ func (e * outExpecter ) expectMatcherFunc (ctx context.Context , str string , matchFn func (src , pattern string ) bool ) string {
179
179
e .t .Helper ()
180
180
181
181
var buffer bytes.Buffer
0 commit comments