From 16b6518293c82100d7b9b813aa9bc37fa13b25ad Mon Sep 17 00:00:00 2001 From: Mike Cohen Date: Tue, 10 Mar 2026 13:08:54 +1000 Subject: [PATCH 1/2] Special handling for converting []byte to strings --- arg_parser/parser.go | 3 +++ functions/functions.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arg_parser/parser.go b/arg_parser/parser.go index e7cbe74..d14ff89 100644 --- a/arg_parser/parser.go +++ b/arg_parser/parser.go @@ -216,6 +216,9 @@ func stringParser(ctx context.Context, scope types.Scope, int16, uint8, int8, float64, float32, int: return fmt.Sprintf("%v", arg), nil + case []uint8, []byte: + return string(t), nil + default: return fmt.Sprintf("%v", arg), nil } diff --git a/functions/functions.go b/functions/functions.go index 4abf70d..b0731bf 100644 --- a/functions/functions.go +++ b/functions/functions.go @@ -195,7 +195,7 @@ func (self _EncodeFunction) Call( case string: arg_string = t - case []byte: + case []byte, []uint8: arg_string = string(t) case error: From 32deab7835b48feb6ec94280cd1d8467625c5391 Mon Sep 17 00:00:00 2001 From: Mike Cohen Date: Tue, 10 Mar 2026 13:12:32 +1000 Subject: [PATCH 2/2] Fix alias --- arg_parser/parser.go | 2 +- functions/functions.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arg_parser/parser.go b/arg_parser/parser.go index d14ff89..2620532 100644 --- a/arg_parser/parser.go +++ b/arg_parser/parser.go @@ -216,7 +216,7 @@ func stringParser(ctx context.Context, scope types.Scope, int16, uint8, int8, float64, float32, int: return fmt.Sprintf("%v", arg), nil - case []uint8, []byte: + case []byte: return string(t), nil default: diff --git a/functions/functions.go b/functions/functions.go index b0731bf..4abf70d 100644 --- a/functions/functions.go +++ b/functions/functions.go @@ -195,7 +195,7 @@ func (self _EncodeFunction) Call( case string: arg_string = t - case []byte, []uint8: + case []byte: arg_string = string(t) case error: