修改返回可用ip bug

This commit is contained in:
huangsimin 2018-12-28 11:16:50 +08:00
parent abbfb5fbd9
commit a00de486e4

View File

@ -200,7 +200,6 @@ func (swi *Switch) switchActives(w http.ResponseWriter, req *http.Request) {
for addr, group := range swi.Worker.ForLoop {
addrmap := make(map[string]interface{})
content[addr] = addrmap
isappend := int64(0)
var hosts []string
@ -211,6 +210,7 @@ func (swi *Switch) switchActives(w http.ResponseWriter, req *http.Request) {
hosts = append(hosts, dhost.Host)
}
if isappend > 1 {
content[addr] = addrmap
addrmap["group"] = hosts
addrmap["city"] = group.City
}