summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md
index 3156539..23c2672 100644
--- a/README.md
+++ b/README.md
@@ -47,7 +47,7 @@ pub fn main() !void {
47 47
48 var args = clap.parse(clap.Help, &params, std.heap.page_allocator, &diag) catch |err| { 48 var args = clap.parse(clap.Help, &params, std.heap.page_allocator, &diag) catch |err| {
49 // Report useful error and exit 49 // Report useful error and exit
50 diag.report(std.io.getStdErr().outStream(), err) catch {}; 50 diag.report(std.io.getStdErr().writer(), err) catch {};
51 return err; 51 return err;
52 }; 52 };
53 defer args.deinit(); 53 defer args.deinit();
@@ -151,7 +151,7 @@ pub fn main() !void {
151 // Because we use a streaming parser, we have to consume each argument parsed individually. 151 // Because we use a streaming parser, we have to consume each argument parsed individually.
152 while (parser.next(&diag) catch |err| { 152 while (parser.next(&diag) catch |err| {
153 // Report useful error and exit 153 // Report useful error and exit
154 diag.report(std.io.getStdErr().outStream(), err) catch {}; 154 diag.report(std.io.getStdErr().writer(), err) catch {};
155 return err; 155 return err;
156 }) |arg| { 156 }) |arg| {
157 // arg.param will point to the parameter which matched the argument. 157 // arg.param will point to the parameter which matched the argument.
@@ -184,7 +184,7 @@ const clap = @import("clap");
184 184
185pub fn main() !void { 185pub fn main() !void {
186 const stderr_file = std.io.getStdErr(); 186 const stderr_file = std.io.getStdErr();
187 var stderr_out_stream = stderr_file.outStream(); 187 var stderr_out_stream = stderr_file.writer();
188 188
189 // clap.help is a function that can print a simple help message, given a 189 // clap.help is a function that can print a simple help message, given a
190 // slice of Param(Help). There is also a helpEx, which can print a 190 // slice of Param(Help). There is also a helpEx, which can print a
@@ -224,7 +224,7 @@ const std = @import("std");
224const clap = @import("clap"); 224const clap = @import("clap");
225 225
226pub fn main() !void { 226pub fn main() !void {
227 const stderr = std.io.getStdErr().outStream(); 227 const stderr = std.io.getStdErr().writer();
228 228
229 // clap.usage is a function that can print a simple usage message, given a 229 // clap.usage is a function that can print a simple usage message, given a
230 // slice of Param(Help). There is also a usageEx, which can print a 230 // slice of Param(Help). There is also a usageEx, which can print a