mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
interact: scan all return values
This commit is contained in:
parent
cf2d9ca226
commit
ba4c694179
|
@ -243,8 +243,13 @@ func parseFuncArgsAndCall(f interface{}, args []string, objects ...interface{})
|
|||
}
|
||||
|
||||
out := fv.Call(rArgs)
|
||||
if ft.NumOut() > 0 {
|
||||
outType := ft.Out(0)
|
||||
if ft.NumOut() == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
// try to get the error object from the return value
|
||||
for i := 0; i < ft.NumOut(); i++ {
|
||||
outType := ft.Out(i)
|
||||
switch outType.Kind() {
|
||||
case reflect.Interface:
|
||||
o := out[0].Interface()
|
||||
|
|
Loading…
Reference in New Issue
Block a user