mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 10:41:03 +01:00
add example link for IgnoreServerErrors https://github.com/kataras/iris/blob/master/HISTORY.md#th-13-july-2017--v801 🔉
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:
parent
16ccb2edc4
commit
0a4e80c744
|
@ -58,7 +58,7 @@ WithoutServerError(errors ...error) Configurator
|
||||||
By default no error is being ignored, of course.
|
By default no error is being ignored, of course.
|
||||||
|
|
||||||
Example code:
|
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
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|
|
@ -103,6 +103,8 @@ type Configurator func(*Application)
|
||||||
// will return `nil` if the server's error was `http/iris#ErrServerClosed`.
|
// will return `nil` if the server's error was `http/iris#ErrServerClosed`.
|
||||||
//
|
//
|
||||||
// See `Configuration#IgnoreServerErrors []string` too.
|
// 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 {
|
func WithoutServerError(errors ...error) Configurator {
|
||||||
return func(app *Application) {
|
return func(app *Application) {
|
||||||
if len(errors) == 0 {
|
if len(errors) == 0 {
|
||||||
|
@ -251,6 +253,8 @@ type Configuration struct {
|
||||||
//
|
//
|
||||||
// See `WithoutServerError(...)` function too.
|
// 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.
|
// Defaults to an empty slice.
|
||||||
IgnoreServerErrors []string `yaml:"IgnoreServerErrors" toml:"IgnoreServerErrors"`
|
IgnoreServerErrors []string `yaml:"IgnoreServerErrors" toml:"IgnoreServerErrors"`
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user