read packs concurrently

This commit is contained in:
Alexander Neumann
2015-12-06 17:09:06 +01:00
parent 43a23f91a6
commit 0e66a66bce
2 changed files with 46 additions and 10 deletions

View File

@@ -109,6 +109,19 @@ func (cmd CmdCheck) Execute(args []string) error {
}
}
if cmd.ReadData {
cmd.global.Verbosef("reading all data\n")
errChan := make(chan error)
go chkr.ReadData(errChan, done)
for err := range errChan {
errorsFound = true
fmt.Fprintf(os.Stderr, "%v\n", err)
}
}
if errorsFound {
return errors.New("repository contains errors")
}