avoid a couple of dive allocations

pull/256/head
joeybloggs 8 years ago
parent 01925e342a
commit 27b607d6ad
  1. 6
      validator.go

@ -318,10 +318,12 @@ OUTER:
} else { } else {
tVal := string(v.misc)[1:]
v.errs = append(v.errs, v.errs = append(v.errs,
&fieldError{ &fieldError{
tag: string(v.misc)[1:], tag: tVal,
actualTag: string(v.misc)[1:], actualTag: tVal,
ns: string(append(ns, cf.altName...)), ns: string(append(ns, cf.altName...)),
structNs: string(append(structNs, cf.name...)), structNs: string(append(structNs, cf.name...)),
field: cf.altName, field: cf.altName,

Loading…
Cancel
Save