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 --- example/comptime-clap.zig | 4 +--- example/simple.zig | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'example') diff --git a/example/comptime-clap.zig b/example/comptime-clap.zig index 530c7e6..e5d02ff 100644 --- a/example/comptime-clap.zig +++ b/example/comptime-clap.zig @@ -12,9 +12,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); diff --git a/example/simple.zig b/example/simple.zig index f7b5953..270e344 100644 --- a/example/simple.zig +++ b/example/simple.zig @@ -10,9 +10,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. -- cgit v1.2.3