mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-07 13:44:17 +08:00
fix(go): use iterator var to set ns;
This commit is contained in:
parent
f9291b3e28
commit
47e8ba1dbe
1 changed files with 4 additions and 4 deletions
|
@ -379,16 +379,16 @@ func GetNameserversForHost(h *models.Host) (returnNsLi []models.Nameserver) {
|
|||
_, all := nsI.Tags["*"]
|
||||
if all {
|
||||
returnNsLi = append(returnNsLi, models.Nameserver{
|
||||
IPs: ns.Servers,
|
||||
MatchDomain: ns.MatchDomain,
|
||||
IPs: nsI.Servers,
|
||||
MatchDomain: nsI.MatchDomain,
|
||||
})
|
||||
continue
|
||||
}
|
||||
for tagI := range node.Tags {
|
||||
if _, ok := nsI.Tags[tagI.String()]; ok {
|
||||
returnNsLi = append(returnNsLi, models.Nameserver{
|
||||
IPs: ns.Servers,
|
||||
MatchDomain: ns.MatchDomain,
|
||||
IPs: nsI.Servers,
|
||||
MatchDomain: nsI.MatchDomain,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue