diff options
Diffstat (limited to 'example/simple.zig')
| -rw-r--r-- | example/simple.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/example/simple.zig b/example/simple.zig index 74157a6..2b7bf0a 100644 --- a/example/simple.zig +++ b/example/simple.zig | |||
| @@ -3,7 +3,7 @@ pub fn main() !void { | |||
| 3 | defer _ = gpa.deinit(); | 3 | defer _ = gpa.deinit(); |
| 4 | 4 | ||
| 5 | // First we specify what parameters our program can take. | 5 | // First we specify what parameters our program can take. |
| 6 | // We can use `parseParamsComptime` to parse a string into an array of `Param(Help)` | 6 | // We can use `parseParamsComptime` to parse a string into an array of `Param(Help)`. |
| 7 | const params = comptime clap.parseParamsComptime( | 7 | const params = comptime clap.parseParamsComptime( |
| 8 | \\-h, --help Display this help and exit. | 8 | \\-h, --help Display this help and exit. |
| 9 | \\-n, --number <usize> An option parameter, which takes a value. | 9 | \\-n, --number <usize> An option parameter, which takes a value. |
| @@ -20,7 +20,7 @@ pub fn main() !void { | |||
| 20 | .diagnostic = &diag, | 20 | .diagnostic = &diag, |
| 21 | .allocator = gpa.allocator(), | 21 | .allocator = gpa.allocator(), |
| 22 | }) catch |err| { | 22 | }) catch |err| { |
| 23 | // Report useful error and exit | 23 | // Report useful error and exit. |
| 24 | diag.report(std.io.getStdErr().writer(), err) catch {}; | 24 | diag.report(std.io.getStdErr().writer(), err) catch {}; |
| 25 | return err; | 25 | return err; |
| 26 | }; | 26 | }; |