(types ...any)
| 27 | } |
| 28 | |
| 29 | func types(types ...any) []reflect.Type { |
| 30 | ts := make([]reflect.Type, len(types)) |
| 31 | for i, t := range types { |
| 32 | t := reflect.TypeOf(t) |
| 33 | if t.Kind() == reflect.Ptr { |
| 34 | t = t.Elem() |
| 35 | } |
| 36 | if t.Kind() != reflect.Func { |
| 37 | panic("not a function") |
| 38 | } |
| 39 | ts[i] = t |
| 40 | } |
| 41 | return ts |
| 42 | } |
| 43 | |
| 44 | func toInt(val any) (int, error) { |
| 45 | switch v := val.(type) { |
no test coverage detected
searching dependent graphs…