1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-01-23 17:53:23 +02:00

16 lines
254 B
Go
Raw Normal View History

2015-05-22 11:37:40 -07:00
package render
import (
"encoding/xml"
"net/http"
)
type XML struct {
Data interface{}
}
func (r XML) Write(w http.ResponseWriter) error {
w.Header().Set("Content-Type", "application/xml; charset=utf-8")
return xml.NewEncoder(w).Encode(r.Data)
}