From 6c6b29cc1f7d1cc166a11131cc87e9f369978a84 Mon Sep 17 00:00:00 2001 From: icechen Date: Wed, 29 Dec 2021 20:50:41 +0800 Subject: [PATCH] fix HasPrefix --- config_handler/config_handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config_handler/config_handler.go b/config_handler/config_handler.go index cb662a6..29f0942 100644 --- a/config_handler/config_handler.go +++ b/config_handler/config_handler.go @@ -82,7 +82,7 @@ func getModifiedApi(api ApiList, modifiedFileList []string) ApiList { tempIndex := NewSet() for i, a := range api { for _, file := range modifiedFileList { - if strings.HasSuffix(file, a.Root) { + if strings.HasPrefix(file, a.Root) { tempIndex.Add(i) } } @@ -99,7 +99,7 @@ func getModifiedService(service ServiceList, modifiedFileList []string) ServiceL tempIndex := NewSet() for i, s := range service { for _, file := range modifiedFileList { - if strings.HasSuffix(file, s.Root) { + if strings.HasPrefix(file, s.Root) { tempIndex.Add(i) } }