summaryrefslogtreecommitdiff
path: root/vendor/github.com/gin-gonic/gin/render/xml.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/gin-gonic/gin/render/xml.go')
-rw-r--r--vendor/github.com/gin-gonic/gin/render/xml.go28
1 files changed, 0 insertions, 28 deletions
diff --git a/vendor/github.com/gin-gonic/gin/render/xml.go b/vendor/github.com/gin-gonic/gin/render/xml.go
deleted file mode 100644
index 6af890179..000000000
--- a/vendor/github.com/gin-gonic/gin/render/xml.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// 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)
-}