From 657f5a2fd73a38e1b60880229c8b35afef1272de Mon Sep 17 00:00:00 2001 From: "D. Bohdan" Date: Tue, 26 Nov 2024 19:28:37 +0000 Subject: [PATCH] refactor(parseArgs): make "--" code less confusing Right now the two conditionals one after another look like a mistake. --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 8c5c033..4830443 100644 --- a/main.go +++ b/main.go @@ -242,8 +242,9 @@ func parseArgs() config { if arg == "--" { i++ + break } - if arg == "--" || !strings.HasPrefix(arg, "-") { + if !strings.HasPrefix(arg, "-") { break }