From 3e17869ae28889f8daac905b8bf4413c4ed0c037 Mon Sep 17 00:00:00 2001 From: Yota Toyama Date: Wed, 22 Nov 2017 21:52:52 +0900 Subject: [PATCH] Refactor main.go --- main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.go b/main.go index d23708c..d4154b4 100644 --- a/main.go +++ b/main.go @@ -30,8 +30,7 @@ func main() { }() rc := make(chan fileResult, maxOpenFiles) - s := newSemaphore(args.concurrency) - c := newFileChecker(args.timeout, args.documentRoot, s) + c := newFileChecker(args.timeout, args.documentRoot, newSemaphore(args.concurrency)) go c.CheckMany(m.Filenames(), rc)