Allow ParseOptions to compose multiple option parsers easily
There are certain options which we need to share in multiple binaries, for example, the signer options. Current options parsing function only accepts 1 extra option handler, which is inflexible. Extend it to take a list of extra option handlers. Currently, to add a new CLI flag, caller must append the flag name to `extra_long_opts`, then pass an extra option handler which can handle that option. Define a new dataclass which contains both the CLI flag name and the code to handle that flag for better composition. Test: th Bug: 293313353 Change-Id: I758db66dfd95934f5b2701454d97bfe7d37dc16d
Loading
Please register or sign in to comment