Skip to content

Commit

Permalink
check error
Browse files Browse the repository at this point in the history
  • Loading branch information
kmulvey committed Apr 9, 2024
1 parent 82fdfec commit af6de84
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cmd/nsquared/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ CollectionLoop:
results = nil
continue
}
resultsLogger.LogResult(result)
if err := resultsLogger.LogResult(result); err != nil {
log.Error(err)
}

case err, open := <-errors:
if !open {
errors = nil
Expand Down
5 changes: 4 additions & 1 deletion cmd/uniqdirs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ func dedupDir(ctx context.Context, cancel context.CancelFunc, dir string, thread
results = nil
continue
}
resultsLogger.LogResult(result)
if err := resultsLogger.LogResult(result); err != nil {
log.Error(err)
}

case err, open := <-errors:
if !open {
errors = nil
Expand Down

0 comments on commit af6de84

Please sign in to comment.