Last active
November 23, 2017 20:50
-
-
Save kcmerrill/8d6bb14c46f17c26c4daf9d3c5825ca5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (a *Alfred) invoke(method string, args ...interface{}) chan bool { | |
finished := make(chan bool) | |
params := make([]reflect.Value, len(args)) | |
for idx := range args { | |
params[idx] = reflect.ValueOf(args[idx]) | |
} | |
reflect.ValueOf(a).MethodByName(strings.Title(strings.ToLower(method))).Call(params) | |
return finished | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment