Browse Source

Define files capacity

renovate/configure
Yota Toyama 8 years ago
parent
commit
ae5845e406
  1. 6
      main.go

6
main.go

@ -2,6 +2,8 @@ package main
import "os" import "os"
const filesCapacity = 1024
func main() { func main() {
args, err := getArguments(nil) args, err := getArguments(nil)
@ -10,11 +12,11 @@ func main() {
os.Exit(1) os.Exit(1)
} }
fc := make(chan string, 1024) fc := make(chan string, filesCapacity)
go findMarkupFiles(args.filenames, args.recursive, fc) go findMarkupFiles(args.filenames, args.recursive, fc)
rc := make(chan fileResult, 1024) rc := make(chan fileResult, filesCapacity)
s := newSemaphore(args.concurrency) s := newSemaphore(args.concurrency)
c := newFileChecker(args.timeout, args.documentRoot, s) c := newFileChecker(args.timeout, args.documentRoot, s)

Loading…
Cancel
Save