1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 02:17:05 +00:00

New XMLMap func which makes a map value type an xml compatible content to render and give option to render a Problem as XML - rel to #1335

Former-commit-id: dcf21098ff7af6becfa9896df5f82c3b0b53f0ac
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-08-16 19:18:46 +03:00
parent 8d188817a6
commit 75ea978194
5 changed files with 165 additions and 48 deletions

View File

@@ -503,6 +503,13 @@ var (
//
// A shortcut for the `context#NewProblem`.
NewProblem = context.NewProblem
// XMLMap wraps a map[string]interface{} to compatible xml marshaler,
// in order to be able to render maps as XML on the `Context.XML` method.
//
// Example: `Context.XML(XMLMap("Root", map[string]interface{}{...})`.
//
// A shortcut for the `context#XMLMap`.
XMLMap = context.XMLMap
)
// Contains the enum values of the `Context.GetReferrer()` method,