feat(binding): support override default binding implement (#3514)

This commit is contained in:
ssfyn 2024-03-23 08:50:25 +08:00 committed by GitHub
parent d4e4136488
commit fd1faaded0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,18 +73,18 @@ var Validator StructValidator = &defaultValidator{}
// These implement the Binding interface and can be used to bind the data // These implement the Binding interface and can be used to bind the data
// present in the request to struct instances. // present in the request to struct instances.
var ( var (
JSON = jsonBinding{} JSON BindingBody = jsonBinding{}
XML = xmlBinding{} XML BindingBody = xmlBinding{}
Form = formBinding{} Form Binding = formBinding{}
Query = queryBinding{} Query Binding = queryBinding{}
FormPost = formPostBinding{} FormPost Binding = formPostBinding{}
FormMultipart = formMultipartBinding{} FormMultipart Binding = formMultipartBinding{}
ProtoBuf = protobufBinding{} ProtoBuf BindingBody = protobufBinding{}
MsgPack = msgpackBinding{} MsgPack BindingBody = msgpackBinding{}
YAML = yamlBinding{} YAML BindingBody = yamlBinding{}
Uri = uriBinding{} Uri BindingUri = uriBinding{}
Header = headerBinding{} Header Binding = headerBinding{}
TOML = tomlBinding{} TOML BindingBody = tomlBinding{}
) )
// Default returns the appropriate Binding instance based on the HTTP method // Default returns the appropriate Binding instance based on the HTTP method