From d010c82c5db65eea212a07fa4c0ab15e6de9c3a9 Mon Sep 17 00:00:00 2001 From: Miccah Castorina Date: Mon, 31 Jul 2023 10:56:51 -0500 Subject: [PATCH] Comment catchFirstFatal function --- pkg/sources/source_manager.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/sources/source_manager.go b/pkg/sources/source_manager.go index f78d30b09dc1..890099478d40 100644 --- a/pkg/sources/source_manager.go +++ b/pkg/sources/source_manager.go @@ -256,6 +256,8 @@ func (s *SourceManager) runWithUnits(ctx context.Context, handle handle, source unitCh: make(chan SourceUnit), report: report, } + // Create a function that will save the first error encountered (if + // any) and discard the rest. fatalErr := make(chan error, 1) catchFirstFatal := func(err error) { select {