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 return
} }
valider, hasValider := filter.(Valider) validator, hasValidator := filter.(Validator)
if hasValider { if hasValidator {
err = valider.Valid() err = validator.Validate()
} }
if err != nil { if err != nil {
return return

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

Loading…
Cancel
Save