mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
dynamic: add doc comment to CallMatch
Signed-off-by: c9s <yoanlin93@gmail.com>
This commit is contained in:
parent
910c17a567
commit
8851e67356
|
@ -53,6 +53,10 @@ func CallStructFieldsMethod(m interface{}, method string, args ...interface{}) e
|
|||
}
|
||||
|
||||
// CallMatch calls the function with the matched argument automatically
|
||||
// you can define multiple parameter factory function to inject the return value as the function argument.
|
||||
// e.g.,
|
||||
// CallMatch(targetFunction, 1, 10, true, func() *ParamType { .... })
|
||||
//
|
||||
func CallMatch(f interface{}, objects ...interface{}) ([]reflect.Value, error) {
|
||||
fv := reflect.ValueOf(f)
|
||||
ft := reflect.TypeOf(f)
|
||||
|
|
Loading…
Reference in New Issue
Block a user