fix go vet: address go vet warnings
License: MIT Signed-off-by: Hector Sanjuan <code@hector.link>
This commit is contained in:
parent
c0628e43ff
commit
9a246a237d
|
@ -314,7 +314,6 @@ func (c *Cluster) pushPingMetrics() {
|
|||
case <-ticker.C:
|
||||
}
|
||||
}
|
||||
logger.Debugf("Peer %s. Finished pushPingMetrics", c.id)
|
||||
}
|
||||
|
||||
// read the alerts channel from the monitor and triggers repins
|
||||
|
|
|
@ -253,7 +253,7 @@ func (cfg *Config) LoadJSON(raw []byte) error {
|
|||
|
||||
clusterSecret, err := DecodeClusterSecret(jcfg.Secret)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error loading cluster secret from config: ", err)
|
||||
err = fmt.Errorf("error loading cluster secret from config: %s", err)
|
||||
return err
|
||||
}
|
||||
cfg.Secret = clusterSecret
|
||||
|
|
|
@ -141,7 +141,8 @@ func TestConsensusAddPeer(t *testing.T) {
|
|||
t.Error("the operation did not make it to the log:", err)
|
||||
}
|
||||
|
||||
ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||
defer cancel()
|
||||
err = cc2.raft.WaitForPeer(ctx, cc.host.ID().Pretty(), false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
@ -173,7 +174,8 @@ func TestConsensusRmPeer(t *testing.T) {
|
|||
t.Error("could not add peer:", err)
|
||||
}
|
||||
|
||||
ctx, _ := context.WithTimeout(context.Background(), 20*time.Second)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
|
||||
defer cancel()
|
||||
err = cc.raft.WaitForPeer(ctx, cc2.host.ID().Pretty(), false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
|
|
@ -152,7 +152,7 @@ func newRaftWrapper(peers []peer.ID, host host.Host, cfg *Config, fsm hraft.FSM)
|
|||
logger.Error("Raft peers do not match cluster peers from the configuration.")
|
||||
logger.Error("This likely indicates that this peer has left the cluster and/or")
|
||||
logger.Error("has a dirty state. Clean the raft state for this peer")
|
||||
logger.Error("(%s)", dataFolder)
|
||||
logger.Errorf("(%s)", dataFolder)
|
||||
logger.Error("bootstrap it to a working cluster.")
|
||||
logger.Error("Raft peers:")
|
||||
for _, s := range currentCfg.Servers {
|
||||
|
|
|
@ -361,7 +361,6 @@ func daemon(c *cli.Context) error {
|
|||
//case <-cluster.Ready():
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var facilities = []string{
|
||||
|
|
Loading…
Reference in New Issue
Block a user