-
-
Notifications
You must be signed in to change notification settings - Fork 140
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: Add xand tag #442
Conversation
Co-authored-by: Stautis <[email protected]>
Feature/xand tag
I like the idea, but "xand" isn't really a valid boolean operator! Can we rename it to "and"? To answer your question, I think having a check that xor and and aren't used together would be good. |
Thanks for the PR BTW, appreciate it! |
Renaming it to "and" is not a problem. I will also try to make a check for when they are used together, but that might take a bit longer to finish. |
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.
Nice nice, thanks!
I have added the possibility to add a xand tag.
It works similarly to the xor tag, but requires all flags within the xand group to be set.
I have tried to stay consistent to the style already used, and touch existing functions as little as possible.
The one issue I have not handled here which should probably be resolved before merging is the possibility of a user putting two or more flags in the same xor and xand group, which would cause problems. The reason I have not solved this issue is because I was a bit unsure about how you would like to handle it. Should it be up to the user to check for this when testing their application? Or should kong give an error? Do you have a standard for how you handle issues like this?