From 717fb5d3ec38d465ed3758b0c42b2e2b1cad2b31 Mon Sep 17 00:00:00 2001 From: yangpeng <183851063@qq.com> Date: Tue, 10 Jan 2023 17:17:48 +0800 Subject: [PATCH] fix goopt.Strings error --- goopt.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/goopt.go b/goopt.go index 6c54837..21030b1 100644 --- a/goopt.go +++ b/goopt.go @@ -550,15 +550,6 @@ func match(x string, allflags []string) string { } } out := "" - for _, f := range allflags { - if len(f) >= len(x) && f[0:len(x)] == x { - if out == "" { - out = f - } else { - return "" - } - } - } return out }