From 807e6f56eacdbc286677b7590d2385c716fdd8de Mon Sep 17 00:00:00 2001 From: Gianluca Artioli Date: Thu, 8 Aug 2024 17:26:57 +0200 Subject: [PATCH] #190-FetchInteger: Fix --- vals.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vals.go b/vals.go index a76f158a..038ef7ca 100644 --- a/vals.go +++ b/vals.go @@ -410,6 +410,10 @@ func (r *Runtime) prepare() (*expansion.ExpandRegexMatch, error) { for i, k := range keys { newobj := map[string]interface{}{} switch t := obj[k].(type) { + case int: + return fmt.Sprint(t), nil + case bool: + return fmt.Sprint(t), nil case string: if i != len(keys)-1 { return "", fmt.Errorf("unexpected type of value for key at %d=%s in %v: expected map[string]interface{}, got %v(%T)", i, k, keys, t, t)