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

add Context.ReadJSONProtobuf method

Former-commit-id: 9c7f268c0d7be7e405ea97a5ac12257beba3a4f3
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-06-28 23:05:07 +03:00
parent cdf0fe24e9
commit 871b4ef7fc
11 changed files with 362 additions and 6 deletions

View File

@@ -73,7 +73,9 @@ func main() {
})
app.Get("/xml", func(ctx iris.Context) {
ctx.XML(ExampleXML{One: "hello", Two: "xml"}) // or iris.Map{"One":"hello"...}
ctx.XML(ExampleXML{One: "hello", Two: "xml"})
// OR:
// ctx.XML(iris.XMLMap("keys", iris.Map{"key": "value"}))
})
app.Get("/markdown", func(ctx iris.Context) {
@@ -82,6 +84,8 @@ func main() {
app.Get("/yaml", func(ctx iris.Context) {
ctx.YAML(ExampleYAML{Name: "Iris", ServerAddr: "localhost:8080"})
// OR:
// ctx.YAML(iris.Map{"name": "Iris", "serverAddr": "localhost:8080"})
})
// app.Get("/protobuf", func(ctx iris.Context) {