1
0
mirror of https://github.com/kataras/iris.git synced 2026-03-06 16:35:57 +00:00

Update to 6.0.9: Add PostInterrupt plugin. Read HISTORY.md

- Add `PostInterrupt` plugin, useful for customization of the
**os.Interrupt** singal, before that Iris closed the server
automatically.

```go
iris.Plugins.PostInterrupt(func(s *Framework){
// when os.Interrupt signal is fired the body of this function will be
fired,
// you're responsible for closing the server with s.Close()

// if that event is not registered then the framework
// will close the server for you.

/* Do  any custom cleanup and finally call the s.Close()
remember you have the iris.Plugins.PreClose(func(s *Framework)) event
too
so you can split your logic in two logically places.
*/

})

```
This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-01-11 16:23:38 +02:00
parent c5f95ba78a
commit 5ad7c6e01f
5 changed files with 117 additions and 18 deletions

View File

@@ -18,7 +18,7 @@
<br/>
<a href="https://github.com/kataras/iris/blob/master/HISTORY.md"><img src="https://img.shields.io/badge/%20version%20-%206.0.8%20-blue.svg?style=flat-square" alt="CHANGELOG/HISTORY"></a>
<a href="https://github.com/kataras/iris/blob/master/HISTORY.md"><img src="https://img.shields.io/badge/%20version%20-%206.0.9%20-blue.svg?style=flat-square" alt="CHANGELOG/HISTORY"></a>
<a href="https://github.com/iris-contrib/examples"><img src="https://img.shields.io/badge/%20examples-repository-3362c2.svg?style=flat-square" alt="Examples"></a>
@@ -129,7 +129,7 @@ $ go run hellojson.go
```
> TIP #1> $ iris run main.go to enable hot-reload on .go source code changes.
> TIP #2> iris.Config.IsDevelopment = true to monitor the changes you make in the templates.
> TIP #2> iris.Config.IsDevelopment = true to monitor the changes you make in the templates.
Open your browser or any other http client at http://localhost:6000/api/user/42.
@@ -947,7 +947,7 @@ I recommend testing your API using this new library, [httpexpect](https://github
Versioning
------------
Current: **v6.0.8**
Current: **v6.0.9**
Older: **[v5/fasthttp](https://github.com/kataras/iris/tree/5.0.0)**