From ea525ac1a75bbd19385e67950497b0d992d9b5c3 Mon Sep 17 00:00:00 2001 From: Bryan Frimin Date: Wed, 1 Oct 2025 13:07:49 +0200 Subject: [PATCH] Style Signed-off-by: Bryan Frimin --- pkg/probod/probod.go | 56 ++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/pkg/probod/probod.go b/pkg/probod/probod.go index 23d52285a..d1df5b427 100644 --- a/pkg/probod/probod.go +++ b/pkg/probod/probod.go @@ -335,13 +335,13 @@ func (impl *Implm) Run( apiServerCtx, stopApiServer := context.WithCancel(context.Background()) defer stopApiServer() - wg.Add(1) - go func() { - defer wg.Done() - if err := impl.runApiServer(apiServerCtx, l, r, tp, serverHandler); err != nil { - cancel(fmt.Errorf("api server crashed: %w", err)) - } - }() + wg.Go( + func() { + if err := impl.runApiServer(apiServerCtx, l, r, tp, serverHandler); err != nil { + cancel(fmt.Errorf("api server crashed: %w", err)) + } + }, + ) mailerCtx, stopMailer := context.WithCancel(context.Background()) mailer := mailer.NewMailer(pgClient, l, mailer.Config{ @@ -353,32 +353,32 @@ func (impl *Implm) Run( TLSRequired: impl.cfg.Mailer.SMTP.TLSRequired, Timeout: time.Second * 10, }) - wg.Add(1) - go func() { - defer wg.Done() - if err := mailer.Run(mailerCtx); err != nil { - cancel(fmt.Errorf("mailer crashed: %w", err)) - } - }() + wg.Go( + func() { + if err := mailer.Run(mailerCtx); err != nil { + cancel(fmt.Errorf("mailer crashed: %w", err)) + } + }, + ) exportJobExporterCtx, stopExportJobExporter := context.WithCancel(context.Background()) - wg.Add(1) - go func() { - defer wg.Done() - if err := impl.runExportJob(exportJobExporterCtx, proboService, l.Named("export-job-exporter")); err != nil { - cancel(fmt.Errorf("export job exporter crashed: %w", err)) - } - }() + wg.Go( + func() { + if err := impl.runExportJob(exportJobExporterCtx, proboService, l.Named("export-job-exporter")); err != nil { + cancel(fmt.Errorf("export job exporter crashed: %w", err)) + } + }, + ) trustCenterServerCtx, stopTrustCenterServer := context.WithCancel(context.Background()) defer stopTrustCenterServer() - wg.Add(1) - go func() { - defer wg.Done() - if err := impl.runTrustCenterServer(trustCenterServerCtx, l, r, tp, pgClient, serverHandler, acmeService); err != nil { - cancel(fmt.Errorf("trust center server crashed: %w", err)) - } - }() + wg.Go( + func() { + if err := impl.runTrustCenterServer(trustCenterServerCtx, l, r, tp, pgClient, serverHandler, acmeService); err != nil { + cancel(fmt.Errorf("trust center server crashed: %w", err)) + } + }, + ) <-ctx.Done()