mirror of
https://github.com/kataras/iris.git
synced 2026-01-11 05:55:57 +00:00
Update to 8.3.3 | Even better MVC. Read HISTORY.md
Former-commit-id: 88998c317117abff1a214cf396b205d8d8ea888c
This commit is contained in:
@@ -33,7 +33,6 @@ It doesn't always contain the "best ways" but it does cover each important featu
|
||||
* [using the `RegisterOnInterrupt`](http-listening/graceful-shutdown/default-notifier/main.go)
|
||||
* [using a custom notifier](http-listening/graceful-shutdown/custom-notifier/main.go)
|
||||
|
||||
|
||||
### Configuration
|
||||
|
||||
- [Functional](configuration/functional/main.go)
|
||||
@@ -41,7 +40,6 @@ It doesn't always contain the "best ways" but it does cover each important featu
|
||||
- [Import from YAML file](configuration/from-yaml-file/main.go)
|
||||
- [Import from TOML file](configuration/from-toml-file/main.go)
|
||||
|
||||
|
||||
### Routing, Grouping, Dynamic Path Parameters, "Macros" and Custom Context
|
||||
|
||||
* `app.Get("{userid:int min(1)}", myHandler)`
|
||||
|
||||
@@ -77,11 +77,15 @@ type HelloController struct {
|
||||
mvc.Controller
|
||||
}
|
||||
|
||||
type myJSONData struct {
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
// Get serves
|
||||
// Method: GET
|
||||
// Resource: http://localhost:8080/hello
|
||||
func (c *HelloController) Get() {
|
||||
c.Ctx.JSON(iris.Map{"message": "Hello iris web framework."})
|
||||
c.Ctx.JSON(myJSONData{"Hello iris web framework."})
|
||||
}
|
||||
|
||||
/* Can use more than one, the factory will make sure
|
||||
|
||||
Reference in New Issue
Block a user