Small fixes

This commit is contained in:
Anton Medvedev
2023-08-18 14:21:59 +02:00
parent e1ebe9cff0
commit ff899ca004
4 changed files with 3 additions and 2 deletions
+1
View File
@@ -8,6 +8,7 @@ var (
anyType = reflect.TypeOf(new(interface{})).Elem()
integerType = reflect.TypeOf(0)
floatType = reflect.TypeOf(float64(0))
arrayType = reflect.TypeOf([]interface{}{})
)
func kind(t reflect.Type) reflect.Kind {
-1
View File
@@ -20,7 +20,6 @@ var (
timeType = reflect.TypeOf(time.Time{})
durationType = reflect.TypeOf(time.Duration(0))
functionType = reflect.TypeOf(new(func(...interface{}) (interface{}, error))).Elem()
errorType = reflect.TypeOf((*error)(nil)).Elem()
)
func combined(a, b reflect.Type) reflect.Type {
+1
View File
@@ -32,6 +32,7 @@ type Env struct {
Abstract Abstract
ArrayOfAny []interface{}
ArrayOfInt []int
ArrayOfString []string
ArrayOfFoo []*Foo
MapOfFoo map[string]Foo
MapOfAny map[string]interface{}
+1 -1
View File
@@ -267,7 +267,7 @@ func In(needle interface{}, array interface{}) bool {
return false
}
panic(fmt.Sprintf(`operator "in"" not defined on %T`, array))
panic(fmt.Sprintf(`operator "in" not defined on %T`, array))
}
func Len(a interface{}) int {