diff options
| author | 2021-07-17 10:43:05 +0000 | |
|---|---|---|
| committer | 2021-07-17 10:43:05 +0000 | |
| commit | 9bff7f332b86a18ff2f34e5c59ebdad5336e9850 (patch) | |
| tree | c52a4f776554ae4378f57a35d8b6b264a89cb739 /example/simple.zig | |
| parent | Forward diagnostics down to StreamingClap (diff) | |
| download | zig-clap-9bff7f332b86a18ff2f34e5c59ebdad5336e9850.tar.gz zig-clap-9bff7f332b86a18ff2f34e5c59ebdad5336e9850.tar.xz zig-clap-9bff7f332b86a18ff2f34e5c59ebdad5336e9850.zip | |
Use debug.print instead of deprecated debug.warn in examples
fixes comment on #11
Diffstat (limited to '')
| -rw-r--r-- | example/simple.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/example/simple.zig b/example/simple.zig index 78a963c..ff6d301 100644 --- a/example/simple.zig +++ b/example/simple.zig | |||
| @@ -26,11 +26,11 @@ pub fn main() !void { | |||
| 26 | defer args.deinit(); | 26 | defer args.deinit(); |
| 27 | 27 | ||
| 28 | if (args.flag("--help")) | 28 | if (args.flag("--help")) |
| 29 | debug.warn("--help\n", .{}); | 29 | debug.print("--help\n", .{}); |
| 30 | if (args.option("--number")) |n| | 30 | if (args.option("--number")) |n| |
| 31 | debug.warn("--number = {s}\n", .{n}); | 31 | debug.print("--number = {s}\n", .{n}); |
| 32 | for (args.options("--string")) |s| | 32 | for (args.options("--string")) |s| |
| 33 | debug.warn("--string = {s}\n", .{s}); | 33 | debug.print("--string = {s}\n", .{s}); |
| 34 | for (args.positionals()) |pos| | 34 | for (args.positionals()) |pos| |
| 35 | debug.warn("{s}\n", .{pos}); | 35 | debug.print("{s}\n", .{pos}); |
| 36 | } | 36 | } |