From 9f139d3b4c15ced0500832fe947f9b08782f8205 Mon Sep 17 00:00:00 2001 From: "yusuke.kadowaki" Date: Sun, 19 Mar 2023 23:07:27 +0900 Subject: [PATCH] fix to detect zerolog event --- zerologlint.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zerologlint.go b/zerologlint.go index 5c54f9a..d82bc2d 100644 --- a/zerologlint.go +++ b/zerologlint.go @@ -93,8 +93,7 @@ func isInLogPkg(c *ssa.Call) bool { func isZerologEvent(v ssa.Value) bool { ts := v.Type().String() - t := removeVendor(ts) - return t == "github.com/rs/zerolog.Event" + return strings.HasSuffix(ts, "github.com/rs/zerolog.Event") } // RemoVendor removes vendoring information from import path.