From 6231f96d5fb3187999fdcfff97ce8f4bce1bb476 Mon Sep 17 00:00:00 2001 From: kataras Date: Wed, 2 Aug 2017 14:31:34 +0300 Subject: [PATCH] Add a note for the latest history entry written by @hiveminded , only go1.9 users can use reference to iris.Party Former-commit-id: 8821d33c40e7e5fda80895703b2131db4ed7c83e --- HISTORY.md | 2 +- context.go | 9 +++++++++ iris.go | 7 ------- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index d1c468d2..4ec7428c 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -22,7 +22,7 @@ Developers are not forced to upgrade if they don't really need it. Upgrade whene - Add `Option` function to the `html view engine`: https://github.com/kataras/iris/issues/694 - Fix sessions backend databases restore expiration: https://github.com/kataras/iris/issues/692 by @corebreaker -- Add `PartyFunc`, same as `Party` but receives a function with the sub router as its argument instead +- Add `PartyFunc`, same as `Party` but receives a function with the sub router as its argument instead [GO1.9 Users-ONLY] # Mo, 31 July 2017 | v8.1.2 diff --git a/context.go b/context.go index 81c3bb4f..e66b4916 100644 --- a/context.go +++ b/context.go @@ -5,6 +5,7 @@ package iris import ( "github.com/kataras/iris/context" "github.com/kataras/iris/core/host" + "github.com/kataras/iris/core/router" ) // TODO: When go 1.9 will be released @@ -40,4 +41,12 @@ type ( // Used to add supervisor configurators on common Runners // without the need of importing the `core/host` package. Supervisor = host.Supervisor + + // Party is just a group joiner of routes which have the same prefix and share same middleware(s) also. + // Party could also be named as 'Join' or 'Node' or 'Group' , Party chosen because it is fun. + // + // Look the `core/router#APIBuilder` for its implementation. + // + // A shortcut for the `core/router#Party`, useful when `PartyFunc` is being used. + Party = router.Party ) diff --git a/iris.go b/iris.go index 24817429..b4bf89da 100644 --- a/iris.go +++ b/iris.go @@ -298,13 +298,6 @@ func (app *Application) View(writer io.Writer, filename string, layout string, b } var ( - // Party is just a group joiner of routes which have the same prefix and share same middleware(s) also. - // Party could also be named as 'Join' or 'Node' or 'Group' , Party chosen because it is fun. - // - // Look the `core/router#APIBuilder` for its implementation. - // - // A shortcut for the `core/router#Party`, useful when `PartyFunc` is being used. - Party router.Party // LimitRequestBodySize is a middleware which sets a request body size limit // for all next handlers in the chain. //