diff options
Diffstat (limited to '')
| -rw-r--r-- | example/help.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/example/help.zig b/example/help.zig index de3b707..f3edb58 100644 --- a/example/help.zig +++ b/example/help.zig | |||
| @@ -7,12 +7,12 @@ pub fn main() !void { | |||
| 7 | clap.parseParam("-v, --version Output version information and exit.") catch unreachable, | 7 | clap.parseParam("-v, --version Output version information and exit.") catch unreachable, |
| 8 | }; | 8 | }; |
| 9 | 9 | ||
| 10 | var args = try clap.parse(clap.Help, ¶ms, .{}); | 10 | var res = try clap.parse(clap.Help, ¶ms, clap.parsers.default, .{}); |
| 11 | defer args.deinit(); | 11 | defer res.deinit(); |
| 12 | 12 | ||
| 13 | // clap.help is a function that can print a simple help message, given a | 13 | // clap.help is a function that can print a simple help message, given a |
| 14 | // slice of Param(Help). There is also a helpEx, which can print a | 14 | // slice of Param(Help). There is also a helpEx, which can print a |
| 15 | // help message for any Param, but it is more verbose to call. | 15 | // help message for any Param, but it is more verbose to call. |
| 16 | if (args.flag("--help")) | 16 | if (res.args.help) |
| 17 | return clap.help(std.io.getStdErr().writer(), ¶ms); | 17 | return clap.help(std.io.getStdErr().writer(), clap.Help, ¶ms); |
| 18 | } | 18 | } |