summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 4 insertions, 8 deletions
diff --git a/README.md b/README.md
index 6a1435f..b9fbda7 100644
--- a/README.md
+++ b/README.md
@@ -404,14 +404,10 @@ pub fn main() !void {
404 }); 404 });
405 defer res.deinit(); 405 defer res.deinit();
406 406
407 // `clap.usage` is a function that can print a simple help message. It can print any `Param` 407 // `clap.usageToFile` is a function that can print a simple usage string. It can print any
408 // where `Id` has a `value` method (`Param(Help)` is one such parameter). 408 // `Param` where `Id` has a `value` method (`Param(Help)` is one such parameter).
409 if (res.args.help != 0) { 409 if (res.args.help != 0)
410 var buf: [1024]u8 = undefined; 410 return clap.usage(.stdout(), clap.Help, &params);
411 var stderr = std.fs.File.stderr().writer(&buf);
412 try clap.usage(&stderr.interface, clap.Help, &params);
413 return stderr.interface.flush();
414 }
415} 411}
416 412
417const clap = @import("clap"); 413const clap = @import("clap");