forked from forgejo/forgejo
golint fixed for modules/auth
This commit is contained in:
parent
e6da2cf2cb
commit
ec87a75c00
16 changed files with 103 additions and 24 deletions
|
@ -10,7 +10,8 @@ import (
|
|||
"github.com/go-macaron/binding"
|
||||
)
|
||||
|
||||
type AdminCrateUserForm struct {
|
||||
// AdminCreateUserForm form for admin to create user
|
||||
type AdminCreateUserForm struct {
|
||||
LoginType string `binding:"Required"`
|
||||
LoginName string
|
||||
UserName string `binding:"Required;AlphaDashDot;MaxSize(35)"`
|
||||
|
@ -19,10 +20,12 @@ type AdminCrateUserForm struct {
|
|||
SendNotify bool
|
||||
}
|
||||
|
||||
func (f *AdminCrateUserForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
||||
// Validate validates form fields
|
||||
func (f *AdminCreateUserForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
||||
return validate(errs, ctx.Data, f, ctx.Locale)
|
||||
}
|
||||
|
||||
// AdminEditUserForm form for admin to create user
|
||||
type AdminEditUserForm struct {
|
||||
LoginType string `binding:"Required"`
|
||||
LoginName string
|
||||
|
@ -39,6 +42,7 @@ type AdminEditUserForm struct {
|
|||
ProhibitLogin bool
|
||||
}
|
||||
|
||||
// Validate validates form fields
|
||||
func (f *AdminEditUserForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
||||
return validate(errs, ctx.Data, f, ctx.Locale)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue