summaryrefslogtreecommitdiffstats
path: root/modules/auth/auth.go
diff options
context:
space:
mode:
authorBo-Yi Wu <appleboy.tw@gmail.com>2017-03-03 16:21:31 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2017-03-03 16:21:31 +0800
commit28a5bc313a36d761a020ee26f1e011f91f36cbb2 (patch)
treed43a11513bd568ef5faa8446447f81eaf482e4f0 /modules/auth/auth.go
parent6bdfadf4a9a2f7c8082560381d28b3005efbf883 (diff)
downloadgitea-28a5bc313a36d761a020ee26f1e011f91f36cbb2.tar.gz
gitea-28a5bc313a36d761a020ee26f1e011f91f36cbb2.zip
fix: gofmt errors. (#1106)
Diffstat (limited to 'modules/auth/auth.go')
-rw-r--r--modules/auth/auth.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/auth/auth.go b/modules/auth/auth.go
index 4a31ff944e..33ba777966 100644
--- a/modules/auth/auth.go
+++ b/modules/auth/auth.go
@@ -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 {