Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify grepper interface #139

Merged
merged 2 commits into from
Jun 4, 2016
Merged

Conversation

yinghau76
Copy link
Contributor

Throttling and synchronization can be done without duplicating the same
logic in various greppers.

Throttling and synchronization can be done without duplicating the same
logic in various greppers.
f, err := getFileHandler(path)
if err != nil {
log.Fatalf("open: %s\n", err)
}

defer func() {
f.Close()
<-sem
wg.Done()
}()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can now be: defer f.Close()

@monochromegane
Copy link
Owner

LGTM. Thanks!!

@monochromegane monochromegane merged commit e51394f into monochromegane:master Jun 4, 2016
@yinghau76 yinghau76 deleted the dev branch June 4, 2016 18:15
@p47t p47t restored the dev branch May 17, 2019 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants