mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
fix: gofmt errors. (#1106)
This commit is contained in:
@@ -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 {
|
||||
|
@@ -37,7 +37,7 @@ type AuthenticationForm struct {
|
||||
SkipVerify bool
|
||||
PAMServiceName string
|
||||
Oauth2Provider string
|
||||
Oauth2Key string
|
||||
Oauth2Key string
|
||||
Oauth2Secret string
|
||||
}
|
||||
|
||||
|
@@ -5,16 +5,18 @@
|
||||
package oauth2
|
||||
|
||||
import (
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
|
||||
"github.com/gorilla/sessions"
|
||||
"github.com/markbates/goth"
|
||||
"github.com/markbates/goth/gothic"
|
||||
"net/http"
|
||||
"os"
|
||||
"github.com/satori/go.uuid"
|
||||
"path/filepath"
|
||||
"github.com/markbates/goth/providers/github"
|
||||
"github.com/satori/go.uuid"
|
||||
)
|
||||
|
||||
var (
|
||||
|
Reference in New Issue
Block a user