From 720197b9b1ba05f68c1c32a11d96f08f1f37ffad Mon Sep 17 00:00:00 2001 From: Erik Wilson Date: Mon, 10 Aug 2020 11:12:02 -0700 Subject: [PATCH] Fix linting issues --- cmd/agent/main.go | 2 +- pkg/agent/loadbalancer/loadbalancer_test.go | 5 ++--- pkg/server/server.go | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cmd/agent/main.go b/cmd/agent/main.go index f4911a15f3..41c8f0aa65 100644 --- a/cmd/agent/main.go +++ b/cmd/agent/main.go @@ -11,7 +11,7 @@ import ( func main() { app := cmds.NewApp() - app.Commands = []cli.Command{ + app.Commands = []*cli.Command{ cmds.NewAgentCommand(agent.Run), } diff --git a/pkg/agent/loadbalancer/loadbalancer_test.go b/pkg/agent/loadbalancer/loadbalancer_test.go index 4e57f9a0bb..2a9b1f3560 100644 --- a/pkg/agent/loadbalancer/loadbalancer_test.go +++ b/pkg/agent/loadbalancer/loadbalancer_test.go @@ -2,7 +2,6 @@ package loadbalancer import ( "bufio" - "context" "errors" "fmt" "io/ioutil" @@ -106,7 +105,7 @@ func TestFailOver(t *testing.T) { DataDir: tmpDir, } - lb, err := New(context.Background(), cfg.DataDir, SupervisorServiceName, cfg.ServerURL) + lb, err := New(cfg.DataDir, SupervisorServiceName, cfg.ServerURL) if err != nil { assertEqual(t, err, nil) } @@ -157,7 +156,7 @@ func TestFailFast(t *testing.T) { DataDir: tmpDir, } - lb, err := New(context.Background(), cfg.DataDir, SupervisorServiceName, cfg.ServerURL) + lb, err := New(cfg.DataDir, SupervisorServiceName, cfg.ServerURL) if err != nil { assertEqual(t, err, nil) } diff --git a/pkg/server/server.go b/pkg/server/server.go index 5710dfc374..89b7bb05fe 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -103,7 +103,7 @@ func startWrangler(ctx context.Context, config *Config) error { return case <-config.ControlConfig.Runtime.APIServerReady: if err := runControllers(ctx, config); err != nil { - logrus.Fatal("failed to start controllers: %v", err) + logrus.Fatalf("failed to start controllers: %v", err) } } }() @@ -433,7 +433,7 @@ func setMasterRoleLabel(ctx context.Context, nodes v1.NodeClient) error { node.Labels[MasterRoleLabelKey] = "true" _, err = nodes.Update(node) if err == nil { - logrus.Infof("master role label has been set succesfully on node: %s", nodeName) + logrus.Infof("master role label has been set successfully on node: %s", nodeName) break } select {