look for details at https://github.com/kataras/iris/blob/master/HISTORY.md#th-13-july-2017--v801


Former-commit-id: 9466a2a6e697f17e5b47cb7cacec087c745af146
This commit is contained in:
hiveminded 2017-07-13 16:38:35 +03:00
parent 16ccb2edc4
commit 0a4e80c744
2 changed files with 5 additions and 1 deletions

View File

@ -58,7 +58,7 @@ WithoutServerError(errors ...error) Configurator
By default no error is being ignored, of course.
Example code:
[_examples/http-listening/omit-server-errors](https://github.com/kataras/iris/tree/master/_examples/http-listening/omit-server-errors)
[_examples/http-listening/omit-server-errors](https://github.com/kataras/iris/tree/master/_examples/http-listening/listen-addr/omit-server-errors)
```go
package main

View File

@ -103,6 +103,8 @@ type Configurator func(*Application)
// will return `nil` if the server's error was `http/iris#ErrServerClosed`.
//
// See `Configuration#IgnoreServerErrors []string` too.
//
// Example: https://github.com/kataras/iris/tree/master/_examples/http-listening/listen-addr/omit-server-errors
func WithoutServerError(errors ...error) Configurator {
return func(app *Application) {
if len(errors) == 0 {
@ -251,6 +253,8 @@ type Configuration struct {
//
// See `WithoutServerError(...)` function too.
//
// Example: https://github.com/kataras/iris/tree/master/_examples/http-listening/listen-addr/omit-server-errors
//
// Defaults to an empty slice.
IgnoreServerErrors []string `yaml:"IgnoreServerErrors" toml:"IgnoreServerErrors"`