-
Notifications
You must be signed in to change notification settings - Fork 138
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
feature: Rule methods #104
Comments
Regarding the |
@stapelberg , Yes. I want to be able to see one liner rule, similar to “nft” utility. Today, it takes an “essay” to get a gist of what a rule does! 😄 i am not complaining ... i appreciate the complexity ... i learned from the experience ... however, it would probably make the library easier to consume. In fact, back in March, i failed to use the library because of its use complexity. Then, I stumbled upon a few blog posts and had an epiphany :-) |
It is just Rule does not have any method ... For example ... ‘IsVerdictDrop’, ‘IsVerdictJump’, ‘IsIPv4’, ‘IsIPv6’, etc. |
Sure, in that case adding String() makes sense. For the other methods, I’m tentatively in favor, but let’s discuss those over a pull request maybe? In general, this library is pretty low-level, so I don’t want to add too much syntactic sugar. |
@stapelberg , absolutely!
👍 |
Before this commit: the printing of a rule results in a pointer address. After this commit: the printing of a rules results in a human-readable text. Resolves: google#104 Signed-off-by: Paul Greenberg <greenpau@outlook.com>
@stapelberg, @sbezverk and other maintainers, currently many module's structs have no methods of their own. For example, it would have been nice to have
String()
method forRule
.Is it OK to submit a PR for this?
The text was updated successfully, but these errors were encountered: