1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-09 21:15:56 +00:00

Update to version 12.1.8 - Read HISTORY.md

Former-commit-id: d3d30cb15537146e3071731be9d674a5cb59de97
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-02-16 11:14:35 +02:00
parent 899aec8b19
commit 08403f0317
21 changed files with 275 additions and 240 deletions

View File

@@ -3,6 +3,6 @@ module app
go 1.13
require (
github.com/kataras/iris/v12 v12.1.7
github.com/kataras/iris/v12 v12.1.8
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
)

View File

@@ -31,11 +31,19 @@ func newApp() *iris.Application {
return ctx.Request().Context()
}).
// Bind loginRequest.
Register(func(ctx iris.Context) loginRequest {
var req loginRequest
ctx.ReadJSON(&req)
return req
}).
// Register(func(ctx iris.Context) loginRequest {
// var req loginRequest
// ctx.ReadJSON(&req)
// return req
// }).
// OR
// Bind any other structure or pointer to a structure from request's
// XML
// YAML
// Query
// Form
// JSON (default, if not client's "Content-Type" specified otherwise)
Register(mvc.AutoBinding).
Handle(&myController{})
return app

View File

@@ -6,7 +6,7 @@ import (
"github.com/kataras/iris/v12/httptest"
)
func TestBindContextContext(t *testing.T) {
func TestGRPCCompatible(t *testing.T) {
app := newApp()
e := httptest.New(t, app)

View File

@@ -215,9 +215,9 @@ type bintree struct {
}
var _bintree = &bintree{nil, map[string]*bintree{
"templates": &bintree{nil, map[string]*bintree{
"index.pug": &bintree{templatesIndexPug, map[string]*bintree{}},
"layout.pug": &bintree{templatesLayoutPug, map[string]*bintree{}},
"templates": {nil, map[string]*bintree{
"index.pug": {templatesIndexPug, map[string]*bintree{}},
"layout.pug": {templatesLayoutPug, map[string]*bintree{}},
}},
}}