mirror of
https://github.com/kataras/iris.git
synced 2026-01-07 20:17:05 +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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user