Skip to content

Commit

Permalink
Use simpler expression to check importer packages
Browse files Browse the repository at this point in the history
  • Loading branch information
picatz committed Jan 3, 2024
1 parent 1246a4c commit 1c73dac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion log/injection/injection.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 1c73dac

Please sign in to comment.