Browse Source

chore: clear lint warnings

Signed-off-by: Alejandro Mery <amery@jpi.io>
pull/55/head
Alejandro Mery 2 months ago
parent
commit
401603f4be
  1. 6
      cmd/jpictl/gateway.go
  2. 5
      pkg/cluster/ceph_scan.go
  3. 2
      pkg/wireguard/config_parser.go

6
cmd/jpictl/gateway.go

@ -43,7 +43,7 @@ func gatewaySet(zi cluster.ZoneIterator, gw string) error {
zi.ForEachZone(func(z *cluster.Zone) bool {
for _, m := range z.Machines {
if m.Name == gw {
z.SetGateway(m.ID, true)
_ = z.SetGateway(m.ID, true)
return true
}
}
@ -79,8 +79,8 @@ func gatewayUnset(zi cluster.ZoneIterator, ngw string) error {
zi.ForEachZone(func(z *cluster.Zone) bool {
for _, m := range z.Machines {
if m.Name == ngw && m.IsGateway() {
z.SetGateway(m.ID, false)
m.RemoveWireguardConfig(0)
_ = z.SetGateway(m.ID, false)
_ = m.RemoveWireguardConfig(0)
return true
}
}

5
pkg/cluster/ceph_scan.go

@ -73,10 +73,7 @@ func newCephScanTODO(cfg *ceph.Config) *cephScanTODO {
func (m *Cluster) scanCephMonitors(opts *ScanOptions) error {
cfg, err := m.GetCephConfig()
switch {
case os.IsNotExist(err):
err = nil
case err != nil:
if err != nil && !os.IsNotExist(err) {
return err
}

2
pkg/wireguard/config_parser.go

@ -8,8 +8,6 @@ import (
"darvaza.org/core"
)
type sectionHandler func(*Config, *basic.Section) error
var sectionMap = map[string]func(*Config, *basic.Section) error{
"Interface": loadInterfaceConfSection,
"Peer": loadPeerConfSection,

Loading…
Cancel
Save