From e6fdc1052ae73bec96c6ec0b76777da95d674669 Mon Sep 17 00:00:00 2001 From: guangwu Date: Tue, 14 Nov 2023 17:16:39 +0800 Subject: [PATCH] chore: use strings.Contains instead (#3562) --- pkg/proc/scope_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/proc/scope_test.go b/pkg/proc/scope_test.go index eccc67e0..728aeb43 100644 --- a/pkg/proc/scope_test.go +++ b/pkg/proc/scope_test.go @@ -187,7 +187,7 @@ func (check *scopeCheck) Parse(descr string, t *testing.T) { } varcheck.name = strings.TrimSpace(decl[:space]) 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) }