Skip to content

Commit

Permalink
fix: issue go-ozzo#155
Browse files Browse the repository at this point in the history
  • Loading branch information
Thearas committed Dec 19, 2021
1 parent 34bd547 commit 4556c7c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
)

var (
bytesType = reflect.TypeOf([]byte(nil))
valuerType = reflect.TypeOf((*driver.Valuer)(nil)).Elem()
bytesType = reflect.TypeOf([]byte(nil))
// valuerType = reflect.TypeOf((*driver.Valuer)(nil)).Elem()
)

// EnsureString ensures the given value is a string.
Expand Down Expand Up @@ -148,9 +148,10 @@ func Indirect(value interface{}) (interface{}, bool) {
}
}

if rv.Type().Implements(valuerType) {
return indirectValuer(value.(driver.Valuer))
}
// TODO(gaozifeng): https://github.com/go-ozzo/ozzo-validation/issues/155.
// if rv.Type().Implements(valuerType) {
// return indirectValuer(value.(driver.Valuer))
// }

return value, false
}
Expand Down

0 comments on commit 4556c7c

Please sign in to comment.