From 7f5fe3a7177d579d727abafd091ce8dd26e49710 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Wed, 22 Jun 2022 20:56:52 +0200 Subject: [PATCH] Add comment --- logs/pod_watcher.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/logs/pod_watcher.go b/logs/pod_watcher.go index dbaf421..4d79c30 100644 --- a/logs/pod_watcher.go +++ b/logs/pod_watcher.go @@ -159,6 +159,9 @@ func (pw *PodWatcher) watchPods(ctx context.Context, wg *sync.WaitGroup) error { // logLines is never closed case line := <-logLines: + // FIXME: pw.dst is only written to in this goroutine, but should be + // expected to be read by the calling code. This creates a likely race + // condition (and fails the race checker). if _, err := pw.dst.Write([]byte(line)); err != nil { return fmt.Errorf("error writing logs: %v", err) }