summaryrefslogtreecommitdiff
path: root/example/help.zig
diff options
context:
space:
mode:
authorGravatar Jimmi Holst Christensen2019-12-03 05:43:43 +0100
committerGravatar GitHub2019-12-03 05:43:43 +0100
commitac461f50df2861eb9b6834ba770c3c149c72eb9c (patch)
tree7d76dca13427d585cff36c38230d368e51fb3c20 /example/help.zig
parentAdd clap.parse as the simplest way of using the lib (diff)
parentupdate for latest zig (diff)
downloadzig-clap-ac461f50df2861eb9b6834ba770c3c149c72eb9c.tar.gz
zig-clap-ac461f50df2861eb9b6834ba770c3c149c72eb9c.tar.xz
zig-clap-ac461f50df2861eb9b6834ba770c3c149c72eb9c.zip
Merge pull request #12 from dbandstra/update-for-latest-zig
update for latest zig
Diffstat (limited to '')
-rw-r--r--example/help.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/example/help.zig b/example/help.zig
index de8a55a..1191482 100644
--- a/example/help.zig
+++ b/example/help.zig
@@ -2,7 +2,7 @@ const std = @import("std");
2const clap = @import("clap"); 2const clap = @import("clap");
3 3
4pub fn main() !void { 4pub fn main() !void {
5 const stderr_file = try std.io.getStdErr(); 5 const stderr_file = std.io.getStdErr();
6 var stderr_out_stream = stderr_file.outStream(); 6 var stderr_out_stream = stderr_file.outStream();
7 const stderr = &stderr_out_stream.stream; 7 const stderr = &stderr_out_stream.stream;
8 8
@@ -11,7 +11,7 @@ pub fn main() !void {
11 // help message for any Param, but it is more verbose to call. 11 // help message for any Param, but it is more verbose to call.
12 try clap.help( 12 try clap.help(
13 stderr, 13 stderr,
14 comptime [_]clap.Param(clap.Help){ 14 comptime &[_]clap.Param(clap.Help){
15 clap.parseParam("-h, --help Display this help and exit. ") catch unreachable, 15 clap.parseParam("-h, --help Display this help and exit. ") catch unreachable,
16 clap.parseParam("-v, --version Output version information and exit.") catch unreachable, 16 clap.parseParam("-v, --version Output version information and exit.") catch unreachable,
17 }, 17 },