diff options
Diffstat (limited to 'example/comptime-clap-error.zig')
| -rw-r--r-- | example/comptime-clap-error.zig | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/example/comptime-clap-error.zig b/example/comptime-clap-error.zig deleted file mode 100644 index 3209b74..0000000 --- a/example/comptime-clap-error.zig +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | const std = @import("std"); | ||
| 2 | const clap = @import("clap"); | ||
| 3 | |||
| 4 | pub fn main() !void { | ||
| 5 | const allocator = std.heap.direct_allocator; | ||
| 6 | |||
| 7 | const params = [_]clap.Param(void){clap.Param(void){ | ||
| 8 | .names = clap.Names{ .short = 'h', .long = "help" }, | ||
| 9 | }}; | ||
| 10 | |||
| 11 | var iter = clap.args.OsIterator.init(allocator); | ||
| 12 | defer iter.deinit(); | ||
| 13 | const exe = try iter.next(); | ||
| 14 | |||
| 15 | var args = try clap.ComptimeClap(void, params).parse(allocator, clap.args.OsIterator, &iter); | ||
| 16 | defer args.deinit(); | ||
| 17 | |||
| 18 | _ = args.flag("--helps"); | ||
| 19 | } | ||