-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 queryBool parser #2329
Conversation
Next time PR can be merged, as the functions are similar |
Yes, you are right. I will resolve conflict files. |
I don't know why PR closed; I think because pulled resolved conflicts. |
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.
LGTM
This may not be the right place for this but I didn't want to clog up the issues list with a simple question. What's the reason for |
Most frameworks (in other languages, not just in Go) will calculate the boolean value |
Yes, in the string case
Compare to QueryFloat:
I can't think of a situation where you want to query a non-existent key and get |
No. I think you are right. |
@dozheiny can you provide a PR with a change (function, docs) |
Sure, I'll do it. |
Hi!
Before this PR, I wrote this feature for integer variables #2306 And float variables #2328.
Now I wrote this feature for boolean variables,
With this parser, you can easily extract bool values from URL queries. You can pass the desired key and the URL string to the parser, which will return the boolean value associated with that key. This eliminates manual string parsing and makes retrieving the values you need easier.