Lightpanda: the headless browser designed for AI and automation
cli: drop a comment restating invalidChoice
Adrià Arrufat1e93f038f59a
diff --git a/src/cli.zig b/src/cli.zigindex 06dbe5cf2..734cb97d9 100644--- a/src/cli.zig+++ b/src/cli.zig@@ -200,7 +200,6 @@ pub fn tagNames(comptime E: type) []const []const u8 {};}-/// Logs a bad value for `arg` with the closest of `choices`, if any.pub fn invalidChoice(arg: []const u8, value: []const u8, choices: []const []const u8) error{InvalidArgument} {if (string.closest(value, choices)) |near| {log.fatal(.app, "invalid option choice", .{ .arg = arg, .value = log.red(value), .did_you_mean = log.green(near) });diff --git a/src/string.zig b/src/string.zigindex 3963ddca4..32a953647 100644--- a/src/string.zig+++ b/src/string.zig@@ -594,7 +594,6 @@ test "closest" {try testing.expectEqual(null, closest("md", &formats));try testing.expectEqual("pdf", closest("pdg", &formats));-const commands = [_][]const u8{ "fetch", "mcp", "run" };try testing.expectEqual("run", closest("fun", &commands));try testing.expectEqual(null, closest("ab", &commands));