From e211df7e262bb1e94d602b5df36fe9a88000dfc4 Mon Sep 17 00:00:00 2001 From: jishengjie Date: Wed, 19 Jul 2023 18:01:20 +0800 Subject: [PATCH] Fix: Convert to string type when returning [] byte type --- pkg/interceptor/transformer/condition/equal.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/interceptor/transformer/condition/equal.go b/pkg/interceptor/transformer/condition/equal.go index f704ac055..eca2f5e21 100644 --- a/pkg/interceptor/transformer/condition/equal.go +++ b/pkg/interceptor/transformer/condition/equal.go @@ -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 }