1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-10 21:45:57 +00:00

Update to Version 8.4.2 | Read HISTORY.md

https://github.com/kataras/iris/blob/master/HISTORY.md#fr-15-september-2017--v842

Former-commit-id: 0ee4cc1d93ef7f26e5d402fdfbe07062aff5b08c
This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-09-15 15:05:35 +03:00
parent 1c512619c7
commit 69b5327ecc
14 changed files with 382 additions and 192 deletions

View File

@@ -18,6 +18,48 @@ Developers are not forced to upgrade if they don't really need it. Upgrade whene
**How to upgrade**: Open your command-line and execute this command: `go get -u github.com/kataras/iris`.
# Fr, 15 September 2017 | v8.4.2
## MVC
Support more than one dynamic method function receivers.
```go
package main
import "github.com/kataras/iris"
func main() {
app := iris.New()
app.Controller("/user", new(UserController))
app.Run(iris.Addr("localhost:8080"))
}
type UserController struct { iris.Controller }
// Maps to GET /user
// Request example: http://localhost:8080/user
// as usual.
func (c *UserController) Get() {
c.Text = "hello from /user"
}
// Maps to GET /user/{paramfirst:long}
// Request example: http://localhost:8080/user/42
// as usual.
func (c *UserController) GetBy(userID int64) {
c.Ctx.Writef("hello user with id: %d", userID)
}
// NEW:
// Maps to GET /user/{paramfirst:long}/business/{paramsecond:long}
// Request example: http://localhost:8080/user/42/business/93
func (c *UserController) GetByBusinessBy(userID int64, businessID int64) {
c.Ctx.Writef("fetch a business id: %d that user with id: %d owns, may make your db query faster",
businessID, userID)
}
```
# Th, 07 September 2017 | v8.4.1
## Routing