Skip to content

Commit ad39bb9

Browse files
joeybloggsjoeybloggs
authored andcommitted
code cleanup
1 parent 6ffa5d1 commit ad39bb9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

validator.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,10 @@ func (v *Validate) structRecursive(top interface{}, current interface{}, s inter
244244

245245
var structName string
246246
var numFields int
247+
var cs *cachedStruct
248+
var isCached bool
247249

248-
cs, isCached := structCache.Get(structType)
250+
cs, isCached = structCache.Get(structType)
249251

250252
if isCached {
251253
structName = cs.name

0 commit comments

Comments
 (0)