Răsfoiți Sursa

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.
jvoisin 2 ani în urmă
părinte
comite
5e5cb056c5
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      internal/worker/worker.go

+ 1 - 1
internal/worker/worker.go

@@ -21,7 +21,7 @@ type Worker struct {
 }
 }
 
 
 // Run wait for a job and refresh the given feed.
 // 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.Debug("Worker started",
 		slog.Int("worker_id", w.id),
 		slog.Int("worker_id", w.id),
 	)
 	)