erka opened a new pull request, #3495:
URL: https://github.com/apache/thrift/pull/3495
Client: go
Replace inline regexp.MatchString calls with precompiled
regexp.MustCompile variables for literal vt.pattern annotations.
This avoids recompiling the same regex on every Validate() call.
Also fixes two bugs in the original regexp.MatchString usage:
- Arguments were swapped: MatchString(target, pattern) instead
of MatchString(pattern, target)
- Used ; ok instead of ; !ok, causing validation to fail when the
pattern matched instead of when it didn't
---
- [ ] Did you create an [Apache
Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket? ([Request
account here](https://selfserve.apache.org/jira-account.html), not required for
trivial changes)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]