From 5e5cb056c5c424ec8ffee4c7d3c8745be4d1b489 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 28 Feb 2024 23:44:12 +0100 Subject: [PATCH] Make internal/worker/worker.go read-only Since workers don't communicate anything back to the pool with the channel, there is no need to have it bidirectional. --- internal/worker/worker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/worker/worker.go b/internal/worker/worker.go index d8195f97..0ef0b01f 100644 --- a/internal/worker/worker.go +++ b/internal/worker/worker.go @@ -21,7 +21,7 @@ type Worker struct { } // Run wait for a job and refresh the given feed. -func (w *Worker) Run(c chan model.Job) { +func (w *Worker) Run(c <-chan model.Job) { slog.Debug("Worker started", slog.Int("worker_id", w.id), )