fix(proxy): improve proxy removal logic in build functions

This commit is contained in:
Chang lue Tsen
2025-04-29 17:02:17 +09:00
parent 94416d59a6
commit 6d13060aeb
4 changed files with 28 additions and 13 deletions
+12
View File
@@ -128,3 +128,15 @@ func Contains[T comparable](slice []T, target T) bool {
}
return false
}
// RemoveStringElement 移除指定元素
func RemoveStringElement(arr []string, element ...string) []string {
var result []string
for _, str := range arr {
if !Contains(element, str) {
logger.Infof("Remove Element: %s", str)
result = append(result, str)
}
}
return result
}