Use set literal instead of regex comparison

This commit is contained in:
Owen Mansel-Chan
2023-02-17 16:49:17 +00:00
parent a9f297c031
commit 4fa57bfb2d
2 changed files with 2 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
import go
from Type t
where t.getPackage().getName().regexpMatch("main|pkg1|pkg2")
where t.getPackage().getName() = ["main", "pkg1", "pkg2"]
select t.pp(), strictcount(t.getMethod(_))

View File

@@ -1,5 +1,5 @@
import go
from Type t, string m
where t.getPackage().getName().regexpMatch("main|pkg1|pkg2")
where t.getPackage().getName() = ["main", "pkg1", "pkg2"]
select t.pp(), m, t.getMethod(m)