From 3ce71e00dc15f69b84ebeb1f790cdc057148f457 Mon Sep 17 00:00:00 2001 From: Sven Walter Date: Thu, 19 Dec 2024 12:57:28 +0100 Subject: [PATCH] tolerate nil for declarative workers --- pkg/runutil/dig.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/runutil/dig.go b/pkg/runutil/dig.go index e468668..08846fd 100644 --- a/pkg/runutil/dig.go +++ b/pkg/runutil/dig.go @@ -53,6 +53,10 @@ func RunProvidedWorkers(ctx context.Context, c *dig.Container) error { return c.Invoke(func(in WorkerGroup) error { workers := []Worker{} for _, c := range in.All { + if c == nil { + continue + } + for _, w := range c.Workers() { workers = append(workers, NamedWorkerFromType(w, c),