From d2e9d515d5d66008e86dc3bef0051d4922096b4b Mon Sep 17 00:00:00 2001 From: starry <115192496+sky22333@users.noreply.github.com> Date: Wed, 25 Dec 2024 07:06:41 +0800 Subject: [PATCH] Update main.go --- ghproxy/main.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ghproxy/main.go b/ghproxy/main.go index 60e3f6b..0684260 100644 --- a/ghproxy/main.go +++ b/ghproxy/main.go @@ -205,12 +205,11 @@ func checkURL(u string) []string { return nil } -// 匹配用户名或者仓库名 func checkList(matches, list []string) bool { - for _, item := range list { - if strings.HasPrefix(matches[0], item) || strings.HasPrefix(matches[1], item) { - return true - } - } - return false + for _, item := range list { + if strings.HasPrefix(matches[0], item) { + return true + } + } + return false }