Use clean validator interface name

v2 v2.0.9
Nikita Tokarchuk 4 years ago
parent 86397885e2
commit 1bfa6c3a21
No known key found for this signature in database
GPG Key ID: DBFD964471BAE65C
  1. 6
      mongox/query/compose.go
  2. 6
      mongox/query/validate.go

@ -37,9 +37,9 @@ func Push(query *Query, filter interface{}) (ok bool, err error) {
return
}
valider, hasValider := filter.(Valider)
if hasValider {
err = valider.Valid()
validator, hasValidator := filter.(Validator)
if hasValidator {
err = validator.Validate()
}
if err != nil {
return

@ -1,6 +1,6 @@
package query
// Valider is a filter to validate the filter
type Valider interface {
Valid() (err error)
// Validator is a filter to validate the filter
type Validator interface {
Validate() (err error)
}

Loading…
Cancel
Save