use strings.Contains instead of strings.Index

This commit is contained in:
kevin
2020-08-11 17:18:51 +08:00
committed by kingxt
parent 10cd6053bc
commit d117e31993
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) {