From 0c71d5cc08a4f89b9f634e806b2721d57163e122 Mon Sep 17 00:00:00 2001 From: Elias Rodrigues Date: Sat, 25 Jul 2020 23:01:01 -0300 Subject: [PATCH] Add var timeDurationType --- validator_instance.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/validator_instance.go b/validator_instance.go index 4a89d40..905ce58 100644 --- a/validator_instance.go +++ b/validator_instance.go @@ -41,8 +41,9 @@ const ( ) var ( - timeType = reflect.TypeOf(time.Time{}) - defaultCField = &cField{namesEqual: true} + timeType = reflect.TypeOf(time.Time{}) + timeDurationType = reflect.TypeOf(time.Duration(0)) + defaultCField = &cField{namesEqual: true} ) // FilterFunc is the type used to filter fields using