// retoor <retoor@molodetz.nl>
|
|
|
|
import "argparse" for ArgumentParser
|
|
|
|
var parser = ArgumentParser.new()
|
|
parser.addArgument("-l", {"choices": ["debug", "info", "warn", "error"]})
|
|
|
|
var args = parser.parseArgs(["-l", "trace"]) // expect runtime error: Invalid choice 'trace' for -l
|