chore: use strings.Contains instead (#3562)

This commit is contained in:
guangwu 2023-11-14 17:16:39 +08:00 committed by GitHub
parent 0466226b1d
commit e6fdc1052a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -187,7 +187,7 @@ func (check *scopeCheck) Parse(descr string, t *testing.T) {
} }
varcheck.name = strings.TrimSpace(decl[:space]) varcheck.name = strings.TrimSpace(decl[:space])
varcheck.typ = strings.TrimSpace(decl[space+1:]) varcheck.typ = strings.TrimSpace(decl[space+1:])
if strings.Index(varcheck.typ, " ") >= 0 { if strings.Contains(varcheck.typ, " ") {
t.Fatalf("could not parse scope comment %q (%q)", descr, decl) t.Fatalf("could not parse scope comment %q (%q)", descr, decl)
} }