diff options
| author | 2020-04-11 14:11:08 +0200 | |
|---|---|---|
| committer | 2020-04-11 14:11:08 +0200 | |
| commit | d83747d4d57b339ce2cc42b785436126a8e8c4c6 (patch) | |
| tree | 3f41de0468c54af73010701313124302dc74b4be /example/help.zig | |
| parent | Merge pull request #16 from joachimschmidt557/zig-master (diff) | |
| download | zig-clap-d83747d4d57b339ce2cc42b785436126a8e8c4c6.tar.gz zig-clap-d83747d4d57b339ce2cc42b785436126a8e8c4c6.tar.xz zig-clap-d83747d4d57b339ce2cc42b785436126a8e8c4c6.zip | |
update examples to latest zig
Diffstat (limited to 'example/help.zig')
| -rw-r--r-- | example/help.zig | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/example/help.zig b/example/help.zig index 1191482..2775177 100644 --- a/example/help.zig +++ b/example/help.zig | |||
| @@ -4,13 +4,12 @@ const clap = @import("clap"); | |||
| 4 | pub fn main() !void { | 4 | pub fn main() !void { |
| 5 | const stderr_file = 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; | ||
| 8 | 7 | ||
| 9 | // clap.help is a function that can print a simple help message, given a | 8 | // clap.help is a function that can print a simple help message, given a |
| 10 | // slice of Param(Help). There is also a helpEx, which can print a | 9 | // slice of Param(Help). There is also a helpEx, which can print a |
| 11 | // help message for any Param, but it is more verbose to call. | 10 | // help message for any Param, but it is more verbose to call. |
| 12 | try clap.help( | 11 | try clap.help( |
| 13 | stderr, | 12 | stderr_out_stream, |
| 14 | comptime &[_]clap.Param(clap.Help){ | 13 | comptime &[_]clap.Param(clap.Help){ |
| 15 | clap.parseParam("-h, --help Display this help and exit. ") catch unreachable, | 14 | clap.parseParam("-h, --help Display this help and exit. ") catch unreachable, |
| 16 | clap.parseParam("-v, --version Output version information and exit.") catch unreachable, | 15 | clap.parseParam("-v, --version Output version information and exit.") catch unreachable, |