From 90de0c9c98151bed0948dce7c2dfc216e402f7ac Mon Sep 17 00:00:00 2001 From: Guillaume Boutry Date: Tue, 13 Feb 2024 08:32:25 +0100 Subject: [PATCH] Apply linter fix on clusterd --- sunbeam-microcluster/cmd/sunbeamd/main.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sunbeam-microcluster/cmd/sunbeamd/main.go b/sunbeam-microcluster/cmd/sunbeamd/main.go index ec6937a0..0f5179db 100644 --- a/sunbeam-microcluster/cmd/sunbeamd/main.go +++ b/sunbeam-microcluster/cmd/sunbeamd/main.go @@ -69,14 +69,14 @@ func (c *cmdDaemon) Run(_ *cobra.Command, _ []string) error { // Placeholder for post-action hooks that can be run by MicroCluster. h := &config.Hooks{ // OnBootstrap is run after the daemon is initialized and bootstrapped. - OnBootstrap: func(s *state.State, initConfig map[string]string) error { + OnBootstrap: func(_ *state.State, _ map[string]string) error { logger.Info("This is a hook that runs after the daemon is initialized and bootstrapped") return nil }, // OnStart is run after the daemon is started. - OnStart: func(s *state.State) error { + OnStart: func(_ *state.State) error { logger.Info("This is a hook that runs after the daemon first starts") return nil @@ -90,28 +90,28 @@ func (c *cmdDaemon) Run(_ *cobra.Command, _ []string) error { }, // PreJoin is run after the daemon is initialized and joins a cluster. - PreJoin: func(s *state.State, initConfig map[string]string) error { + PreJoin: func(_ *state.State, _ map[string]string) error { logger.Info("This is a hook that runs after the daemon is initialized and joins an existing cluster, before OnNewMember runs on all peers") return nil }, // PostRemove is run after the daemon is removed from a cluster. - PostRemove: func(s *state.State, force bool) error { + PostRemove: func(s *state.State, _ bool) error { logger.Infof("This is a hook that is run on peer %q after a cluster member is removed", s.Name()) return nil }, // PreRemove is run before the daemon is removed from the cluster. - PreRemove: func(s *state.State, force bool) error { + PreRemove: func(s *state.State, _ bool) error { logger.Infof("This is a hook that is run on peer %q just before it is removed", s.Name()) return nil }, // OnHeartbeat is run after a successful heartbeat round. - OnHeartbeat: func(s *state.State) error { + OnHeartbeat: func(_ *state.State) error { logger.Info("This is a hook that is run on the dqlite leader after a successful heartbeat") return nil