From 65af446b4779e96d289ebcf5ffc259cb862c80ab Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 26 Oct 2024 18:24:48 +0200 Subject: [PATCH] worker: Controller.Add(): remove unused error-return Signed-off-by: Sebastiaan van Stijn --- cmd/buildkitd/main.go | 4 +--- worker/workercontroller.go | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cmd/buildkitd/main.go b/cmd/buildkitd/main.go index 1dc60acb9b0f..4699a31c6408 100644 --- a/cmd/buildkitd/main.go +++ b/cmd/buildkitd/main.go @@ -869,9 +869,7 @@ func newWorkerController(c *cli.Context, wiOpt workerInitializerOpt) (*worker.Co p := w.Platforms(false) bklog.L.Infof("found worker %q, labels=%v, platforms=%v", w.ID(), w.Labels(), formatPlatforms(p)) archutil.WarnIfUnsupported(p) - if err = wc.Add(w); err != nil { - return nil, err - } + wc.Add(w) nWorkers++ } } diff --git a/worker/workercontroller.go b/worker/workercontroller.go index 150eed352a3a..ac4e2e96ba72 100644 --- a/worker/workercontroller.go +++ b/worker/workercontroller.go @@ -29,9 +29,8 @@ func (c *Controller) Close() error { // The first worker becomes the default. // // Add is not thread-safe. -func (c *Controller) Add(w Worker) error { +func (c *Controller) Add(w Worker) { c.workers = append(c.workers, w) - return nil } // List lists workers