Argument passing
Types of arguments
Jackadi supports different ways to pass arguments to tasks:
Positional arguments
Positional arguments are passed in order after the task name:
jack run node1 myplugin.task2 John 30In this example:
Johnis the first positional argument30is the second positional argument
The task receives these arguments in the order they are provided.
Named options (key-value pairs)
Named arguments use the key=value syntax:
jack run node1 myplugin.task3 name="John" age=30This passes:
namewith value"John"agewith value30
These key-value pairs are passed to the task argument implementing sdk.Option. See more details here.
Mixed arguments
You can combine positional and named arguments:
jack run node1 myplugin.task4 John age=30This passes:
Johnas the first positional argumentage=30as a named argument