closes #514, code from bobbo@b4f0b50

This commit is contained in:
Javier Provecho
2016-04-14 23:47:49 +02:00
parent 72ffff6e44
commit 007bd5124a
4 changed files with 46 additions and 0 deletions
+5
View File
@@ -426,6 +426,11 @@ func (c *Context) XML(code int, obj interface{}) {
c.Render(code, render.XML{Data: obj})
}
// YAML serializes the given struct as YAML into the response body.
func (c *Context) YAML(code int, obj interface{}) {
c.Render(code, render.YAML{Data: obj})
}
// String writes the given string into the response body.
func (c *Context) String(code int, format string, values ...interface{}) {
c.Status(code)