Default() — gin Function Reference
Architecture documentation for the Default() function in binding_nomsgpack.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD c7ef0afe_e52e_8e51_63b6_624688a87ba2["Default()"] 092602ef_72a7_e495_d406_50bc5b00b360["binding_nomsgpack.go"] c7ef0afe_e52e_8e51_63b6_624688a87ba2 -->|defined in| 092602ef_72a7_e495_d406_50bc5b00b360 style c7ef0afe_e52e_8e51_63b6_624688a87ba2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
binding/binding_nomsgpack.go lines 91–114
func Default(method, contentType string) Binding {
if method == "GET" {
return Form
}
switch contentType {
case MIMEJSON:
return JSON
case MIMEXML, MIMEXML2:
return XML
case MIMEPROTOBUF:
return ProtoBuf
case MIMEYAML, MIMEYAML2:
return YAML
case MIMEMultipartPOSTForm:
return FormMultipart
case MIMETOML:
return TOML
case MIMEBSON:
return BSON
default: // case MIMEPOSTForm:
return Form
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Default() do?
Default() is a function in the gin codebase, defined in binding/binding_nomsgpack.go.
Where is Default() defined?
Default() is defined in binding/binding_nomsgpack.go at line 91.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free