소스 검색

Fix example test case to call Run() for majority case

Matt Bolt 4 년 전
부모
커밋
6ff0f5fb95
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      pkg/util/worker/example_worker_test.go

+ 2 - 1
pkg/util/worker/example_worker_test.go

@@ -47,7 +47,8 @@ func Example_concurrentWorkers() {
 				fmt.Printf("Receive Result: %.2f for Input: %d\n", result, input)
 			}(i, receive)
 		} else {
-
+			// pass nil if receiving the result isn't necessary
+			workerPool.Run(i, nil)
 		}
 	}