Add comment

This commit is contained in:
Rob Watson 2022-06-22 20:56:52 +02:00
parent c3ada38e68
commit 7f5fe3a717
1 changed files with 3 additions and 0 deletions

View File

@ -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)
}