update free-d-decode

This commit is contained in:
Joel Wetzell
2026-05-23 07:57:34 -05:00
parent 4323a21015
commit 5a2aefbdd5
6 changed files with 19 additions and 11 deletions
+3 -3
View File
@@ -89,7 +89,7 @@ func GetAnyAsByteSlice(value any) ([]byte, bool) {
// check for a slice
v := reflect.ValueOf(value)
if v.Kind() != reflect.Slice {
if v.Kind() != reflect.Slice && v.Kind() != reflect.Array {
return nil, false
}
@@ -108,7 +108,7 @@ func GetAnyAsByteSlice(value any) ([]byte, bool) {
func GetAnyAsIntSlice(value any) ([]int, bool) {
// already a []byte
// already a []int
intSlice, ok := value.([]int)
if ok {
return intSlice, true
@@ -116,7 +116,7 @@ func GetAnyAsIntSlice(value any) ([]int, bool) {
// check for a slice
v := reflect.ValueOf(value)
if v.Kind() != reflect.Slice {
if v.Kind() != reflect.Slice && v.Kind() != reflect.Array {
return nil, false
}