[release] v0.16.0-unstable62

This commit is contained in:
Yann Stepienik
2024-09-21 15:19:06 +01:00
parent 46fe9da1e6
commit b8f67763ba
2 changed files with 6 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "cosmos-server",
"version": "0.16.0-unstable61",
"version": "0.16.0-unstable62",
"description": "",
"main": "test-server.js",
"bugs": {

View File

@@ -453,16 +453,19 @@ func RemoveStringFromSlice(slice []string, s string) []string {
}
func filterHostnamesByWildcard(hostnames []string, wildcards []string) []string {
finalHostnames := make([]string, len(hostnames))
copy(finalHostnames, hostnames)
for _, wildcard := range wildcards {
for _, hostname := range hostnames {
if strings.HasSuffix(hostname, wildcard[1:]) && hostname != wildcard[2:] {
// remove hostname
hostnames = RemoveStringFromSlice(hostnames, hostname)
finalHostnames = RemoveStringFromSlice(finalHostnames, hostname)
}
}
}
return hostnames
return finalHostnames
}
func GetAllHostnames(applyWildCard bool, removePorts bool) []string {
@@ -547,8 +550,6 @@ func GetAllHostnames(applyWildCard bool, removePorts bool) []string {
}
}
Debug("All Hostnames: " + fmt.Sprint(uniqueHostnames))
return uniqueHostnames
}