From 1c73dace987916c23fbb07a3e1221a9d9e195b81 Mon Sep 17 00:00:00 2001 From: Kent 'picat' Gruber Date: Tue, 2 Jan 2024 19:43:19 -0500 Subject: [PATCH] Use simpler expression to check importer packages --- log/injection/injection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log/injection/injection.go b/log/injection/injection.go index eb0ca8e..c5a2a55 100644 --- a/log/injection/injection.go +++ b/log/injection/injection.go @@ -113,7 +113,7 @@ func run(pass *analysis.Pass) (interface{}, error) { // program being analyzed before running the analysis. // // This prevents wasting time analyzing programs that don't log. - if !imports(pass, "log") && !imports(pass, "log/slog") { + if !imports(pass, "log", "log/slog") { return nil, nil }