xml.go — gin Source File
Architecture documentation for xml.go, a go file in the gin codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 6573f388_d845_d401_12e3_7f04297702c7["xml.go"] 50f09d07_ac8c_822a_71ca_5e6dc38887ef["xml"] 6573f388_d845_d401_12e3_7f04297702c7 --> 50f09d07_ac8c_822a_71ca_5e6dc38887ef style 6573f388_d845_d401_12e3_7f04297702c7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// Copyright 2014 Manu Martinez-Almeida. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package render
import (
"encoding/xml"
"net/http"
)
// XML contains the given interface object.
type XML struct {
Data any
}
var xmlContentType = []string{"application/xml; charset=utf-8"}
// Render (XML) encodes the given interface object and writes data with custom ContentType.
func (r XML) Render(w http.ResponseWriter) error {
r.WriteContentType(w)
return xml.NewEncoder(w).Encode(r.Data)
}
// WriteContentType (XML) writes XML ContentType for response.
func (r XML) WriteContentType(w http.ResponseWriter) {
writeContentType(w, xmlContentType)
}
Classes
Dependencies
- xml
Source
Frequently Asked Questions
What does xml.go do?
xml.go is a source file in the gin codebase, written in go.
What does xml.go depend on?
xml.go imports 1 module(s): xml.
Where is xml.go in the architecture?
xml.go is located at render/xml.go (directory: render).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free