Apply suggestions from code review

Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no>
This commit is contained in:
Juan Font
2021-10-20 09:35:56 +02:00
committed by GitHub
parent 19165a40d2
commit 41c5a0ddf5
3 changed files with 8 additions and 7 deletions

3
app.go
View File

@@ -113,7 +113,8 @@ func NewHeadscale(cfg Config) (*Headscale, error) {
if err != nil {
return nil, err
}
if h.cfg.DNSConfig.Routes == nil { // we might have routes already from Split DNS
// we might have routes already from Split DNS
if h.cfg.DNSConfig.Routes == nil {
h.cfg.DNSConfig.Routes = make(map[string][]dnstype.Resolver)
}
for _, d := range magicDNSDomains {