diff --git a/worker.go b/worker.go index 332f772..5904e39 100644 --- a/worker.go +++ b/worker.go @@ -63,7 +63,7 @@ func (w *Worker) run() { }() for f := range w.task { - if nil == f { + if f == nil { w.pool.decRunning() w.pool.workerCache.Put(w) return diff --git a/worker_func.go b/worker_func.go index b13fde1..76e96a3 100644 --- a/worker_func.go +++ b/worker_func.go @@ -63,7 +63,7 @@ func (w *WorkerWithFunc) run() { }() for args := range w.args { - if nil == args { + if args == nil { w.pool.decRunning() w.pool.workerCache.Put(w) return