summaryrefslogtreecommitdiff
path: root/example/simple-error.zig
diff options
context:
space:
mode:
Diffstat (limited to 'example/simple-error.zig')
-rw-r--r--example/simple-error.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/example/simple-error.zig b/example/simple-error.zig
index 3c62f0e..c04a9c6 100644
--- a/example/simple-error.zig
+++ b/example/simple-error.zig
@@ -1,12 +1,12 @@
1const std = @import("std");
2const clap = @import("clap"); 1const clap = @import("clap");
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.Param(clap.Help){
6 clap.parseParam("-h, --help Display this help and exit.") catch unreachable, 6 clap.parseParam("-h, --help Display this help and exit.") catch unreachable,
7 }; 7 };
8 8
9 var args = try clap.parse(clap.Help, &params, std.heap.direct_allocator, null); 9 var args = try clap.parse(clap.Help, &params, .{});
10 defer args.deinit(); 10 defer args.deinit();
11 11
12 _ = args.flag("--helps"); 12 _ = args.flag("--helps");