mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
plugins: support concatenation of multiple args.
"multi" means that specifying a parameter twice will append, not override. Multi args are always given as a JSON array, even if only one. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Added: Plugins: new "multi" field allows an option to be specified multiple times.
This commit is contained in:
@@ -18,4 +18,8 @@ plugin.add_option('str_opt', 'i am a string', 'an example string option')
|
||||
plugin.add_option('int_opt', 7, 'an example int type option', opt_type='int')
|
||||
plugin.add_option('bool_opt', True, 'an example bool type option', opt_type='bool')
|
||||
plugin.add_flag_option('flag_opt', 'an example flag type option')
|
||||
|
||||
plugin.add_option('str_optm', None, 'an example string option', multi=True)
|
||||
plugin.add_option('int_optm', 7, 'an example int type option', opt_type='int', multi=True)
|
||||
|
||||
plugin.run()
|
||||
|
||||
Reference in New Issue
Block a user