fix HasPrefix
continuous-integration/drone/push Build is passing Details

master
icechen 2021-12-29 20:50:41 +08:00
parent 6648d69196
commit 6c6b29cc1f
1 changed files with 2 additions and 2 deletions

View File

@ -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)
}
}