fix: gofmt errors. (#1106)

This commit is contained in:
Bo-Yi Wu 2017-03-03 16:21:31 +08:00 committed by Lunny Xiao
parent 6bdfadf4a9
commit 28a5bc313a
4 changed files with 20 additions and 18 deletions

View file

@ -179,7 +179,7 @@ func AssignForm(form interface{}, data map[string]interface{}) {
func getRuleBody(field reflect.StructField, prefix string) string {
for _, rule := range strings.Split(field.Tag.Get("binding"), ";") {
if strings.HasPrefix(rule, prefix) {
return rule[len(prefix): len(rule) - 1]
return rule[len(prefix) : len(rule)-1]
}
}
return ""
@ -237,7 +237,7 @@ func validate(errs binding.Errors, data map[string]interface{}, f Form, l macaro
}
if errs[0].FieldNames[0] == field.Name {
data["Err_" + field.Name] = true
data["Err_"+field.Name] = true
trName := field.Tag.Get("locale")
if len(trName) == 0 {