chore: clear lint warnings

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2024-07-25 17:16:02 +00:00
parent ac43ee869c
commit 401603f4be
3 changed files with 4 additions and 9 deletions
+3 -3
View File
@@ -43,7 +43,7 @@ func gatewaySet(zi cluster.ZoneIterator, gw string) error {
zi.ForEachZone(func(z *cluster.Zone) bool { zi.ForEachZone(func(z *cluster.Zone) bool {
for _, m := range z.Machines { for _, m := range z.Machines {
if m.Name == gw { if m.Name == gw {
z.SetGateway(m.ID, true) _ = z.SetGateway(m.ID, true)
return true return true
} }
} }
@@ -79,8 +79,8 @@ func gatewayUnset(zi cluster.ZoneIterator, ngw string) error {
zi.ForEachZone(func(z *cluster.Zone) bool { zi.ForEachZone(func(z *cluster.Zone) bool {
for _, m := range z.Machines { for _, m := range z.Machines {
if m.Name == ngw && m.IsGateway() { if m.Name == ngw && m.IsGateway() {
z.SetGateway(m.ID, false) _ = z.SetGateway(m.ID, false)
m.RemoveWireguardConfig(0) _ = m.RemoveWireguardConfig(0)
return true return true
} }
} }
+1 -4
View File
@@ -73,10 +73,7 @@ func newCephScanTODO(cfg *ceph.Config) *cephScanTODO {
func (m *Cluster) scanCephMonitors(opts *ScanOptions) error { func (m *Cluster) scanCephMonitors(opts *ScanOptions) error {
cfg, err := m.GetCephConfig() cfg, err := m.GetCephConfig()
switch { if err != nil && !os.IsNotExist(err) {
case os.IsNotExist(err):
err = nil
case err != nil:
return err return err
} }
-2
View File
@@ -8,8 +8,6 @@ import (
"darvaza.org/core" "darvaza.org/core"
) )
type sectionHandler func(*Config, *basic.Section) error
var sectionMap = map[string]func(*Config, *basic.Section) error{ var sectionMap = map[string]func(*Config, *basic.Section) error{
"Interface": loadInterfaceConfSection, "Interface": loadInterfaceConfSection,
"Peer": loadPeerConfSection, "Peer": loadPeerConfSection,