summaryrefslogtreecommitdiff
path: root/example/help.zig
diff options
context:
space:
mode:
Diffstat (limited to 'example/help.zig')
-rw-r--r--example/help.zig9
1 files changed, 5 insertions, 4 deletions
diff --git a/example/help.zig b/example/help.zig
index f3edb58..64d1709 100644
--- a/example/help.zig
+++ b/example/help.zig
@@ -2,10 +2,11 @@ const clap = @import("clap");
2const std = @import("std"); 2const std = @import("std");
3 3
4pub fn main() !void { 4pub fn main() !void {
5 const params = comptime [_]clap.Param(clap.Help){ 5 const params = comptime clap.parseParamsComptime(
6 clap.parseParam("-h, --help Display this help and exit. ") catch unreachable, 6 \\-h, --help Display this help and exit.
7 clap.parseParam("-v, --version Output version information and exit.") catch unreachable, 7 \\-v, --version Output version information and exit.
8 }; 8 \\
9 );
9 10
10 var res = try clap.parse(clap.Help, &params, clap.parsers.default, .{}); 11 var res = try clap.parse(clap.Help, &params, clap.parsers.default, .{});
11 defer res.deinit(); 12 defer res.deinit();