We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 647d8ca + b14926c commit 76e104dCopy full SHA for 76e104d
caller.go
@@ -61,6 +61,11 @@ func (c *caller) Call(so Socket, args []interface{}) []reflect.Value {
61
} else {
62
a = make([]reflect.Value, len(args))
63
}
64
+
65
+ if len(args) != len(c.Args) {
66
+ return []reflect.Value{reflect.ValueOf([]interface{}{}), reflect.ValueOf(errors.New("Arguments do not match"))}
67
+ }
68
69
for i, arg := range args {
70
v := reflect.ValueOf(arg)
71
if c.Args[i].Kind() != reflect.Ptr {
@@ -73,9 +78,5 @@ func (c *caller) Call(so Socket, args []interface{}) []reflect.Value {
73
78
a[i+diff] = v
74
79
75
80
76
- if len(args) != len(c.Args) {
77
- return []reflect.Value{reflect.ValueOf([]interface{}{}), reflect.ValueOf(errors.New("Arguments do not match"))}
- }
-
81
return c.Func.Call(a)
82
0 commit comments