Skip to content

Commit

Permalink
fix to detect zerolog event
Browse files Browse the repository at this point in the history
  • Loading branch information
ykadowak committed Mar 19, 2023
1 parent c7a8162 commit 9f139d3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions zerologlint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 9f139d3

Please sign in to comment.