-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Description
There is currently no inbuilt method within Values of detecting whether a query parameter without a value is set (e.g. http://example.com/?queryname).
I propose adding the following method to determine whether a specific key is set:
// Checks whether a given key is set.
func (v Values) IsSet(key string) bool {
if _, ok := v[key]; ok {
return true
}
return false
}
This would also work for query parameters with values.
ainar-g and psampazOneOfOne, mdlayher, pymq and hherman1