diff options
| author | 2021-01-10 12:34:39 +1100 | |
|---|---|---|
| committer | 2021-01-10 03:15:40 +0100 | |
| commit | fb1eb05c2114123fff3981923bacfb74ac6b03ae (patch) | |
| tree | 2f20569e10692513e5e2e4a317b938acbfdc8170 /example/streaming-clap.zig | |
| parent | Support all arguments after -- being positionals (diff) | |
| download | zig-clap-fb1eb05c2114123fff3981923bacfb74ac6b03ae.tar.gz zig-clap-fb1eb05c2114123fff3981923bacfb74ac6b03ae.tar.xz zig-clap-fb1eb05c2114123fff3981923bacfb74ac6b03ae.zip | |
zig master updates
Diffstat (limited to 'example/streaming-clap.zig')
| -rw-r--r-- | example/streaming-clap.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/example/streaming-clap.zig b/example/streaming-clap.zig index 941070f..5468fd5 100644 --- a/example/streaming-clap.zig +++ b/example/streaming-clap.zig | |||
| @@ -42,7 +42,7 @@ pub fn main() !void { | |||
| 42 | // Because we use a streaming parser, we have to consume each argument parsed individually. | 42 | // Because we use a streaming parser, we have to consume each argument parsed individually. |
| 43 | while (parser.next(&diag) catch |err| { | 43 | while (parser.next(&diag) catch |err| { |
| 44 | // Report useful error and exit | 44 | // Report useful error and exit |
| 45 | diag.report(std.io.getStdErr().outStream(), err) catch {}; | 45 | diag.report(std.io.getStdErr().writer(), err) catch {}; |
| 46 | return err; | 46 | return err; |
| 47 | }) |arg| { | 47 | }) |arg| { |
| 48 | // arg.param will point to the parameter which matched the argument. | 48 | // arg.param will point to the parameter which matched the argument. |