From ad39bb92ddf41a195605ba4710a41401be078bf4 Mon Sep 17 00:00:00 2001 From: joeybloggs Date: Sun, 7 Jun 2015 23:40:23 -0400 Subject: [PATCH] code cleanup --- validator.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/validator.go b/validator.go index 020d3c8..186111e 100644 --- a/validator.go +++ b/validator.go @@ -244,8 +244,10 @@ func (v *Validate) structRecursive(top interface{}, current interface{}, s inter var structName string var numFields int + var cs *cachedStruct + var isCached bool - cs, isCached := structCache.Get(structType) + cs, isCached = structCache.Get(structType) if isCached { structName = cs.name