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 20, 2021
1 parent 34bd547 commit 485b367
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/go-ozzo/ozzo-validation/v4
module github.com/Thearas/ozzo-validation/v4

go 1.13

Expand Down
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 485b367

Please sign in to comment.