mirror of
https://github.com/juanfont/headscale.git
synced 2025-12-04 14:09:51 +09:00
Address a bunch of golangci-lint warnings.
This commit is contained in:
13
cli.go
13
cli.go
@@ -101,7 +101,6 @@ func (h *Headscale) EnableNodeRoute(namespace string, nodeName string, routeStr
|
||||
for _, p := range *peers {
|
||||
if pUp, ok := h.clientsPolling[uint64(p.ID)]; ok {
|
||||
pUp <- []byte{}
|
||||
} else {
|
||||
}
|
||||
}
|
||||
h.pollMu.Unlock()
|
||||
@@ -111,15 +110,3 @@ func (h *Headscale) EnableNodeRoute(namespace string, nodeName string, routeStr
|
||||
return fmt.Errorf("Could not find routable range")
|
||||
|
||||
}
|
||||
|
||||
func eqCIDRs(a, b []netaddr.IPPrefix) bool {
|
||||
if len(a) != len(b) || ((a == nil) != (b == nil)) {
|
||||
return false
|
||||
}
|
||||
for i, v := range a {
|
||||
if v != b[i] {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user