From cc0885a2fd8c4bbfbf8ffbe6e31a8d0540fec495 Mon Sep 17 00:00:00 2001 From: Jimmi Holst Christensen Date: Tue, 10 Nov 2020 18:31:35 +0100 Subject: Better parseParam --- README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index fbb3e35..ebcebbb 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,7 @@ pub fn main() !void { clap.parseParam("-h, --help Display this help and exit. ") catch unreachable, clap.parseParam("-n, --number An option parameter, which takes a value.") catch unreachable, clap.parseParam("-s, --string ... An option parameter which can be specified multiple times.") catch unreachable, - clap.Param(clap.Help){ - .takes_value = .One, - }, + clap.parseParam("...") catch unreachable, }; // Initalize our diagnostics, which can be used for reporting useful errors. @@ -121,9 +119,7 @@ pub fn main() !void { clap.parseParam("-h, --help Display this help and exit. ") catch unreachable, clap.parseParam("-n, --number An option parameter, which takes a value.") catch unreachable, clap.parseParam("-s, --string ... An option parameter which can be specified multiple times.") catch unreachable, - clap.Param(clap.Help){ - .takes_value = .One, - }, + clap.parseParam("...") catch unreachable, }; const Clap = clap.ComptimeClap(clap.Help, clap.args.OsIterator, ¶ms); -- cgit v1.2.3