-
Notifications
You must be signed in to change notification settings - Fork 106
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
Stop using MustCompile, and instead return an error if any regex fails to compile #67
Comments
I agree! (it's a breaking change) |
I want to ask you if this error will cause the program to hang up directly without any error log. My program also uses client: = parser.parse, and hang up directly without any error log during operation, which makes me wonder where there is a bug |
I'm happy to accept a breaking change, but one issue really is that I'm not using this library in prod atm so I'd rather find someone else who can manage/own such a change.. Interested @skerkour ? |
Hello, Kind regards |
The use of regex.MustCompile (see:
uap-go/uaparser/parser.go
Lines 354 to 360 in daf92ba
We pull down the master regex url daily, so that our regexes are always up to date, and load it right into our servers. The panic cause all our servers to crash last night, until we pinned the master regex url to a working version.
NewFromBytes already has the option to return an error, so why not return the error there?
uap-go/uaparser/parser.go
Lines 209 to 219 in daf92ba
The text was updated successfully, but these errors were encountered: