use strings.Contains instead of strings.Index

This commit is contained in:
kevin
2020-08-11 17:18:51 +08:00
parent 08fa64d553
commit c57051ce63
2 changed files with 3 additions and 3 deletions

View File

@@ -37,7 +37,7 @@ func (mw *mockWriter) Reset() {
}
func (mw *mockWriter) Contains(text string) bool {
return strings.Index(mw.builder.String(), text) > -1
return strings.Contains(mw.builder.String(), text)
}
func TestFileLineFileMode(t *testing.T) {