mirror of
https://github.com/status-im/nim-confutils.git
synced 2025-01-20 17:09:15 +00:00
Add a helper for obtaining a default configuration
This commit is contained in:
parent
5ee45828fa
commit
da24be1a9d
@ -410,6 +410,9 @@ proc load*(Configuration: type,
|
||||
if cmd.defaultSubCommand != -1:
|
||||
result.processMissingOptions(addr cmd.subCommands[cmd.defaultSubCommand])
|
||||
|
||||
proc defaults*(Configuration: type): Configuration =
|
||||
load(Configuration, cmdLine = @[], printUsage = false, quitOnFailure = false)
|
||||
|
||||
proc dispatchImpl(cliProcSym, cliArgs, loadArgs: NimNode): NimNode =
|
||||
# Here, we'll create a configuration object with fields matching
|
||||
# the CLI proc params. We'll also generate a call to the designated
|
||||
|
Loading…
x
Reference in New Issue
Block a user