1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-08 12:31:58 +00:00

Fix iris run main.go not worked properly on some editors. Add notes for next version. Read HISTORY.md

This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-02-05 18:13:24 +02:00
parent 2a911a450c
commit 3430e24188
5 changed files with 155 additions and 30 deletions

View File

@@ -56,6 +56,18 @@ app.Get("/", indexHandler)
## Convert `http.Handler` to `iris.Handler` using the `iris.ToHandler`
```go
// ToHandler converts different type styles of handlers that you
// used to use (usually with third-party net/http middleware) to an iris.HandlerFunc.
//
// Supported types:
// - .ToHandler(h http.Handler)
// - .ToHandler(func(w http.ResponseWriter, r *http.Request))
// - .ToHandler(func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc))
func ToHandler(handler interface{}) HandlerFunc
```
```go
app := iris.New()