mirror of
https://github.com/gin-gonic/gin.git
synced 2026-04-29 15:08:19 +08:00
chore: apply go fmt
This commit is contained in:
parent
8bd37150a6
commit
1c24d1950d
@ -71,18 +71,18 @@ var Validator StructValidator = &defaultValidator{}
|
||||
// These implement the Binding interface and can be used to bind the data
|
||||
// present in the request to struct instances.
|
||||
var (
|
||||
JSON = jsonBinding{}
|
||||
XML = xmlBinding{}
|
||||
Form = formBinding{}
|
||||
Query = queryBinding{}
|
||||
FormPost = formPostBinding{}
|
||||
FormMultipart = formMultipartBinding{}
|
||||
ProtoBuf = protobufBinding{}
|
||||
YAML = yamlBinding{}
|
||||
Uri = uriBinding{}
|
||||
Header = headerBinding{}
|
||||
TOML = tomlBinding{}
|
||||
Plain = plainBinding{}
|
||||
JSON = jsonBinding{}
|
||||
XML = xmlBinding{}
|
||||
Form = formBinding{}
|
||||
Query = queryBinding{}
|
||||
FormPost = formPostBinding{}
|
||||
FormMultipart = formMultipartBinding{}
|
||||
ProtoBuf = protobufBinding{}
|
||||
YAML = yamlBinding{}
|
||||
Uri = uriBinding{}
|
||||
Header = headerBinding{}
|
||||
TOML = tomlBinding{}
|
||||
Plain = plainBinding{}
|
||||
BSON BindingBody = bsonBinding{}
|
||||
)
|
||||
|
||||
|
||||
@ -28,13 +28,13 @@ func (err SliceValidationError) Error() string {
|
||||
|
||||
var b strings.Builder
|
||||
for i, e := range err {
|
||||
if e != nil {
|
||||
if b.Len() > 0 {
|
||||
b.WriteString("\n")
|
||||
if e != nil {
|
||||
if b.Len() > 0 {
|
||||
b.WriteString("\n")
|
||||
}
|
||||
b.WriteString("[" + strconv.Itoa(i) + "]: " + e.Error())
|
||||
}
|
||||
b.WriteString("[" + strconv.Itoa(i) + "]: " + e.Error())
|
||||
}
|
||||
}
|
||||
return b.String()
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user