ants
ants copied to clipboard
Multiple Arguments Pool Function
β¦ Invoke function without explicitly creating an array
name: Pull request about: Propose changes to the code title: 'Multiple arguments pool func' labels: '' assignees: ''
1. Are you opening this pull request for bug-fixs, optimizations or new feature? Optimizations
2. Please describe how these code changes achieve your intention.
To schedule a function with multiple arguments got a little bit ugly when creating an array to pass as an argument, then casting the interface{} to an array again and retrieving the single args. This slight change helps the developer to easily invoke its function passing multiple arguments and receiving directly the array of args. This of course means that single arg functions still have to parse the arg with arg[0]
3. Please link to the relevant issues (if any).
4. Which documentation changes (if any) need to be made/updated because of this PR?
Mainly just the code used as an example, the updated README is included with the PR
4. Checklist
- [x] I have squashed all insignificant commits.
- [x] I have commented my code for explaining package types, values, functions, and non-obvious lines.
- [x] I have written unit tests and verified that all tests passes (if needed).
- [x] I have documented feature info on the README (only when this PR is adding a new feature).
- [x] (optional) I am willing to help maintain this change if there are issues with it later.
Useful! ππ»
Looks fine, great! ππ
This is a breaking change, I think we shouldn't rush into it.
Makes sense, I'll wait longer for it to be included then π―