Skip to content

Commit

Permalink
Fix: Convert to string type when returning [] byte type (loggie-io#596)
Browse files Browse the repository at this point in the history
Co-authored-by: jishengjie <[email protected]>
  • Loading branch information
snowsi and jishengjie authored Jul 21, 2023
1 parent a577e59 commit 1a7b7dc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/interceptor/transformer/condition/equal.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,10 @@ func NewEqual(args []string) (*Equal, error) {
}

func (eq *Equal) Check(e api.Event) bool {
return eq.value == eventops.Get(e, eq.field)
value := eventops.Get(e, eq.field)
if byteValue, ok := value.([]byte); ok {
value = string(byteValue)
}

return eq.value == value
}

0 comments on commit 1a7b7dc

Please sign in to comment.