stackitem: extend Make() with []string

Allow []string to be converted to stackitem.Item.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
Anna Shaleva 2024-06-11 17:50:53 +03:00
parent b66cea5ccc
commit 55fa12355e

View file

@ -128,6 +128,12 @@ func Make(v any) Item {
a = append(a, Make(i))
}
return Make(a)
case []string:
var a []Item
for _, i := range val {
a = append(a, Make(i))
}
return Make(a)
case []any:
res := make([]Item, len(val))
for i := range val {