allow -vvv as option on demo

This commit is contained in:
Emil Lerch 2023-08-29 15:21:15 -07:00
parent 9c403d0e18
commit 993f9cd91c
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -90,8 +90,11 @@ pub fn main() anyerror!void {
proxy = try proxyFromString(args.next().?); // parse stuff proxy = try proxyFromString(args.next().?); // parse stuff
continue; continue;
} }
if (std.mem.eql(u8, "-v", arg)) { if (std.mem.startsWith(u8, arg, "-v")) {
verbose += 1; for (arg[1..]) |c| {
if (c != 'v') return error.InvalidArgument;
verbose += 1;
}
continue; continue;
} }
inline for (@typeInfo(Tests).Enum.fields) |f| { inline for (@typeInfo(Tests).Enum.fields) |f| {