-
Notifications
You must be signed in to change notification settings - Fork 116
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
feat(x/meg): Support capturing components #269
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just capture the entire component?
Can be used by more specific capturers (e.g capture net.AddrIP)
You're right. That would be useful for higher level capturers like "CaptureAddrPort". I'll push changes soon. |
I've exported |
I added |
* Use Matchable interface * Add Bytes to Matchable interface * feat(x/meg): Support capturing bytes * Export CaptureWithF Can be used by more specific capturers (e.g capture net.AddrIP) * Support Any match, RawValue, and multiple Concatenations * Add CaptureAddrPort
Extends megular expressions to support capturing bytes as well. I have a branch that used generics, but Go is not yet good at inferring the type parameter and it looked a bit ugly. There was also not a significant performance increase in using generics for this here.