1
0
mirror of https://github.com/rancher/norman.git synced 2025-08-02 07:59:20 +00:00

Add helper method

This commit is contained in:
Darren Shepherd 2018-01-17 22:29:23 -07:00
parent 409b391766
commit 986c94965f

View File

@ -90,6 +90,10 @@ func ValidMod(mod ModifierType) bool {
return ok
}
func EQ(key, value string) *QueryCondition {
return NewConditionFromString(key, ModifierEQ, value)
}
func NewConditionFromString(field string, mod ModifierType, values ...string) *QueryCondition {
q := &QueryCondition{
Field: field,