Browse Source

Remove extra flags from tagnames

master v0.0.1
Nise Void 3 years ago
parent
commit
6a3a02677f
Signed by: NiseVoid GPG Key ID: FBA14AC83EA602F3
  1. 4
      validate.go

4
validate.go

@ -39,7 +39,11 @@ func (f Fields) ToString(tag string) string {
var name string
if tag != `` {
name = v.Field.Tag.Get(tag)
if idx := strings.IndexRune(name, ','); idx != -1 {
name = name[:idx]
}
}
if name == `` {
name = v.Field.Name
}

Loading…
Cancel
Save