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

return the initialized dictionary instead of storing it in a global variable #1

Merged
merged 1 commit into from
Jan 24, 2019
Merged

Conversation

peterfajdiga
Copy link

This pull request changes two things:

  • The initialized dictionary is returned by the NewBrowscapFromFile function instead of being stored in a global variable. This means that the initialized dictionary can be cleaned up if no longer needed.
  • A new initialization function NewBrowscapFromReader is added, which can read the browscap from any io.Reader implementation, removing the need to store it in a file.

@hamaxx hamaxx merged commit 73babdc into hamaxx:master Jan 24, 2019
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.

2 participants