diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-05 02:42:52 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-05 02:42:52 -0400 |
commit | 816c0ed5e7bba89a87689e56c19a29617f5f0ea9 (patch) | |
tree | a75a6baf4a476d0962ddf9eb76e946d568584544 /modules/base/base.go | |
parent | a641854cad6dddda551a2995c765e970f7cea8ba (diff) | |
download | gitea-816c0ed5e7bba89a87689e56c19a29617f5f0ea9.tar.gz gitea-816c0ed5e7bba89a87689e56c19a29617f5f0ea9.zip |
Fix import path
Diffstat (limited to 'modules/base/base.go')
-rw-r--r-- | modules/base/base.go | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/modules/base/base.go b/modules/base/base.go index e6befb83fd..5536685a4f 100644 --- a/modules/base/base.go +++ b/modules/base/base.go @@ -9,51 +9,4 @@ type ( TmplData map[string]interface{} ) -// __________.__ .___.__ -// \______ \__| ____ __| _/|__| ____ ____ -// | | _/ |/ \ / __ | | |/ \ / ___\ -// | | \ | | \/ /_/ | | | | \/ /_/ > -// |______ /__|___| /\____ | |__|___| /\___ / -// \/ \/ \/ \//_____/ - -// Errors represents the contract of the response body when the -// binding step fails before getting to the application. -type BindingErrors struct { - Overall map[string]string `json:"overall"` - Fields map[string]string `json:"fields"` -} - -// Total errors is the sum of errors with the request overall -// and errors on individual fields. -func (err BindingErrors) Count() int { - return len(err.Overall) + len(err.Fields) -} - -func (this *BindingErrors) Combine(other BindingErrors) { - for key, val := range other.Fields { - if _, exists := this.Fields[key]; !exists { - this.Fields[key] = val - } - } - for key, val := range other.Overall { - if _, exists := this.Overall[key]; !exists { - this.Overall[key] = val - } - } -} - -const ( - BindingRequireError string = "Required" - BindingAlphaDashError string = "AlphaDash" - BindingAlphaDashDotError string = "AlphaDashDot" - BindingMinSizeError string = "MinSize" - BindingMaxSizeError string = "MaxSize" - BindingEmailError string = "Email" - BindingUrlError string = "Url" - BindingDeserializationError string = "DeserializationError" - BindingIntegerTypeError string = "IntegerTypeError" - BindingBooleanTypeError string = "BooleanTypeError" - BindingFloatTypeError string = "FloatTypeError" -) - var GoGetMetas = make(map[string]bool) |