Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (19 sloc) 462 Bytes
package main
import (
"github.com/kataras/iris"
)
func main() {
app := iris.New()
app.Get("/", func(ctx iris.Context) {
ctx.HTML("<h1>Hello World!</h1>")
})
err := app.Run(iris.Addr(":8080"), iris.WithoutServerError(iris.ErrServerClosed))
if err != nil {
// do something
}
// same as:
// err := app.Run(iris.Addr(":8080"))
// if err != nil && (err != iris.ErrServerClosed || err.Error() != iris.ErrServerClosed.Error()) {
// [...]
// }
}