xml.go — fiber Source File
Architecture documentation for xml.go, a go file in the fiber codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 277d5185_570b_db42_beee_e5c1793523cd["xml.go"] adf3d4e8_4d86_86c1_e6cc_281d7b4104af["fmt"] 277d5185_570b_db42_beee_e5c1793523cd --> adf3d4e8_4d86_86c1_e6cc_281d7b4104af style 277d5185_570b_db42_beee_e5c1793523cd fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
package binder
import (
"fmt"
"github.com/gofiber/utils/v2"
)
// XMLBinding is the XML binder for XML request body.
type XMLBinding struct {
XMLDecoder utils.XMLUnmarshal
}
// Name returns the binding name.
func (*XMLBinding) Name() string {
return "xml"
}
// Bind parses the request body as XML and returns the result.
func (b *XMLBinding) Bind(body []byte, out any) error {
if err := b.XMLDecoder(body, out); err != nil {
return fmt.Errorf("failed to unmarshal xml: %w", err)
}
return nil
}
// Reset resets the XMLBinding binder.
func (b *XMLBinding) Reset() {
b.XMLDecoder = nil
}
Types
Dependencies
- fmt
Source
Frequently Asked Questions
What does xml.go do?
xml.go is a source file in the fiber codebase, written in go.
What does xml.go depend on?
xml.go imports 1 module(s): fmt.
Where is xml.go in the architecture?
xml.go is located at binder/xml.go (directory: binder).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free