From 485b36751376d6e1f0ae143ffa53b7793cd76bf7 Mon Sep 17 00:00:00 2001 From: Thearas Date: Sun, 19 Dec 2021 21:44:39 +0800 Subject: [PATCH] fix: issue #155 --- go.mod | 2 +- util.go | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 359af94..b677a95 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/go-ozzo/ozzo-validation/v4 +module github.com/Thearas/ozzo-validation/v4 go 1.13 diff --git a/util.go b/util.go index b15fd9a..770bec2 100644 --- a/util.go +++ b/util.go @@ -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. @@ -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 }