Address a bunch of golangci-lint warnings.
This commit is contained in:
parent
f7b6c68d22
commit
f7c7b4873a
6 changed files with 46 additions and 30 deletions
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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue