-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to call a function with params inside program when a action triggered?a #338
Comments
do you have an example? you can do: actions:
- name: sample script
type: exec
cmd: python config/scripts/main.py <insert parameter> and your script would handle what to do with the parameter. if you're talking about something else, i might need an example. |
@wass3r hi, I am not using script, I wanna call a function inside go program itself, with params. Is that possible? |
i think the short answer is "no". however, you could modify the Go app to accept command line args that call the function. but without modifying the Go code, i don't think there's a way. |
@wass3r no , I mean, call the go code along with bot code, I have a operator object must initialized along with bot it self. which is injected into flatboat already. I just wanna using yaml to config a func, and then execute this func (by name) inside same program , not a standalone executable file. |
so you kind of want to use this as a module in your own code? it's not really meant or written for that purpose. |
@wass3r Yes. May can done with some reflection way? Do u know any idea if I have this command? |
how to call a function with params inside program when a action triggered?a
The text was updated successfully, but these errors were encountered: