mirror of
https://github.com/azukaar/Cosmos-Server.git
synced 2026-01-05 20:05:02 -06:00
[release] v0.16.0-unstable62
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cosmos-server",
|
||||
"version": "0.16.0-unstable61",
|
||||
"version": "0.16.0-unstable62",
|
||||
"description": "",
|
||||
"main": "test-server.js",
|
||||
"bugs": {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user