diff --git a/HISTORY.md b/HISTORY.md index d4c2d21f..8a062d86 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -29,6 +29,11 @@ Thanks to [Santosh Anand](https://github.com/santoshanand) the http://iris-go.co The amount of the next two or three donations you'll send they will be immediately transferred to his own account balance, so be generous please! + +# Tu, 13 June 2017 | v7.1.1 + +Fix [that](https://github.com/iris-contrib/community-board/issues/11). + # Mo, 12 June 2017 | v7.1.0 Fix [that](https://github.com/iris-contrib/community-board/issues/10). diff --git a/README.md b/README.md index 609d9a64..fc2a7de1 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A fast, cross-platform and efficient web framework with robust set of well-desig [](http://goreportcard.com/report/kataras/iris) [](http://support.iris-go.com) [](https://github.com/kataras/iris/tree/master/_examples#table-of-contents) -[](https://godoc.org/github.com/kataras/iris) +[](https://godoc.org/github.com/kataras/iris) [](https://kataras.rocket.chat/channel/iris) [](https://github.com/kataras/iris#buy-me-a-cup-of-coffee) @@ -409,7 +409,7 @@ Besides the fact that we have a [community chat][Chat] for questions or reports Version ------------ -Current: **7.1.0** +Current: **7.1.1** Each new release is pushed to the master. It stays there until the next version. When a next version is released then the previous version goes to its own branch with `gopkg.in` as its import path (and its own vendor folder), in order to keep it working "for-ever". diff --git a/_examples/README.md b/_examples/README.md index 2293b1e6..0275b5c0 100644 --- a/_examples/README.md +++ b/_examples/README.md @@ -58,6 +58,7 @@ It doesn't contains "best ways" neither explains all its features. It's just a s * [Graceful Shutdown](intermediate/graceful-shutdown) * [Basic and simple](intermediate/graceful-shutdown/basic/main.go) * [Custom Host](intermediate/graceful-shutdown/custom-host/main.go) + * [Custom notifier](intermediate/graceful-shutdown/custom-notifier/main.go) * [Custom HTTP Server](intermediate/custom-httpserver) * [Iris way](intermediate/custom-httpserver/iris-way/main.go) * [Standar way](intermediate/custom-httpserver/std-way/main.go) diff --git a/_examples/intermediate/graceful-shutdown/basic/main.go b/_examples/intermediate/graceful-shutdown/basic/main.go index 75c97c2a..94f1385d 100644 --- a/_examples/intermediate/graceful-shutdown/basic/main.go +++ b/_examples/intermediate/graceful-shutdown/basic/main.go @@ -12,7 +12,7 @@ import ( // Before continue, please read the below notes: // // Current version of Iris is auto-graceful on control+C/command+C -// or whenever host's .Shutdown called. +// or kill command sent or whenever app.Shutdown called. // // In order to add a custom interrupt handler(ctrl+c/cmd+c) or // shutdown manually you have to "schedule a host supervisor's task" or @@ -29,7 +29,7 @@ func main() { // tasks are always running in their go-routine by-default. // - // register custom interrupt handler, fires when ctrl+C/cmd+C pressed. + // register custom interrupt handler, fires when ctrl+C/cmd+C pressed or kill command sent. app.Scheduler.Schedule(host.OnInterrupt(func(proc host.TaskProcess) { println("Shutdown the server gracefully...") diff --git a/_examples/intermediate/graceful-shutdown/custom-host/main.go b/_examples/intermediate/graceful-shutdown/custom-host/main.go index e5c11e0d..5c0fde64 100644 --- a/_examples/intermediate/graceful-shutdown/custom-host/main.go +++ b/_examples/intermediate/graceful-shutdown/custom-host/main.go @@ -33,7 +33,7 @@ func main() { // tasks are always running in their go-routine by-default. // - // register custom interrupt handler, fires when ctrl+C/cmd+C pressed, as we did before. + // register custom interrupt handler, fires when ctrl+C/cmd+C pressed or kill command sent, as we did before. srv.Schedule(host.OnInterrupt(func(proc host.TaskProcess) { println("Shutdown the server gracefully...") diff --git a/_examples/intermediate/graceful-shutdown/custom-notifier/main.go b/_examples/intermediate/graceful-shutdown/custom-notifier/main.go new file mode 100644 index 00000000..ac6b6d90 --- /dev/null +++ b/_examples/intermediate/graceful-shutdown/custom-notifier/main.go @@ -0,0 +1,48 @@ +package main + +import ( + stdContext "context" + "os" + "os/signal" + "syscall" + "time" + + "github.com/kataras/iris" + "github.com/kataras/iris/context" +) + +func main() { + app := iris.New() + // output startup banner and error logs on os.Stdout + + app.Get("/", func(ctx context.Context) { + ctx.HTML("