add file counter

This commit is contained in:
z7zmey 2018-06-22 01:00:02 +03:00
parent ca5c3bbfff
commit f068fb7aae

View File

@ -100,13 +100,17 @@ func parserWorker(pathCh <-chan string, result chan<- parser.Parser) {
} }
func printer(result <-chan parser.Parser) { func printer(result <-chan parser.Parser) {
var counter int
for { for {
parserWorker, ok := <-result parserWorker, ok := <-result
if !ok { if !ok {
return return
} }
fmt.Printf("==> %s\n", parserWorker.GetPath()) counter++
fmt.Printf("==> [%d] %s\n", counter, parserWorker.GetPath())
for _, e := range parserWorker.GetErrors() { for _, e := range parserWorker.GetErrors() {
fmt.Println(e) fmt.Println(e)