utils.go: New function isList() that checks is a value is an array of any

This commit is contained in:
Celestino Amoroso 2024-03-30 06:50:49 +01:00
parent 107484d13c
commit 20007a5a81

View File

@ -21,6 +21,11 @@ func isFloat(v any) (ok bool) {
return ok
}
func isList(v any) (ok bool) {
_, ok = v.([]any)
return ok
}
func isNumber(v any) (ok bool) {
return isFloat(v) || isInteger(v)
}