models/issue: improve quality and performance of NewIssue function

This commit is contained in:
Unknwon 2016-08-15 18:40:32 -07:00
parent 4a46613916
commit 4042d1f0c3
13 changed files with 146 additions and 173 deletions

View file

@ -342,18 +342,3 @@ type DeleteRepoFileForm struct {
func (f *DeleteRepoFileForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
return validate(errs, ctx.Data, f, ctx.Locale)
}
// __________ .__
// \______ \____________ ____ ____ | |__
// | | _/\_ __ \__ \ / \_/ ___\| | \
// | | \ | | \// __ \| | \ \___| Y \
// |______ / |__| (____ /___| /\___ >___| /
// \/ \/ \/ \/ \/
type NewBranchForm struct {
OldBranchName string `binding:"Required;MaxSize(100)"`
BranchName string `binding:"Required;MaxSize(100)"`
}
func (f *NewBranchForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
return validate(errs, ctx.Data, f, ctx.Locale)
}