1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-10 05:25:58 +00:00

examples: replace all app.Run(iris.Addr(...)) with app.Listen just for the shake of simplicity, both are doing the same exact thing as it's described on the http listening first example.

Former-commit-id: d20afb2e899aee658a8e0ed1693357798df93462
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-03-05 22:41:27 +02:00
parent b6445c7238
commit 0d26f24eb7
182 changed files with 202 additions and 227 deletions

View File

@@ -110,5 +110,5 @@ func newApp() *iris.Application {
func main() {
app := newApp()
app.Run(iris.Addr(":8080"))
app.Listen(":8080")
}

View File

@@ -50,5 +50,5 @@ func main() {
}
})
app.Run(iris.Addr(":8080"))
app.Listen(":8080")
}

View File

@@ -18,5 +18,5 @@ func main() {
app := newApp()
// http://localhost:8080
// http://localhost:8080/yourname
app.Run(iris.Addr(":8080"), iris.WithoutServerError(iris.ErrServerClosed))
app.Listen(":8080", iris.WithoutServerError(iris.ErrServerClosed))
}

View File

@@ -44,7 +44,7 @@ func main() {
})
}() // ...
app.Run(iris.Addr(":8080"), iris.WithoutServerError(iris.ErrServerClosed))
app.Listen(":8080", iris.WithoutServerError(iris.ErrServerClosed))
}
/* For a golang SSE client you can look at: https://github.com/r3labs/sse#example-client */

View File

@@ -187,5 +187,5 @@ func main() {
// http://localhost:8080
// http://localhost:8080/events
app.Run(iris.Addr(":8080"), iris.WithoutServerError(iris.ErrServerClosed))
app.Listen(":8080", iris.WithoutServerError(iris.ErrServerClosed))
}

View File

@@ -50,5 +50,5 @@ func main() {
}
})
app.Run(iris.Addr(":8080"))
app.Listen(":8080")
}

View File

@@ -50,5 +50,5 @@ func main() {
"not been shown. But it has a transient scope(default) so, it is visible as expected!</h1>")
})
app.Run(iris.Addr(":8080"))
app.Listen(":8080")
}

View File

@@ -17,5 +17,5 @@ func main() {
ctx.GzipResponseWriter().WriteString("Hello World!")
})
app.Run(iris.Addr(":8080"))
app.Listen(":8080")
}

View File

@@ -91,5 +91,5 @@ func main() {
//
// `iris.WithoutServerError` is an optional configurator,
// if passed to the `Run` then it will not print its passed error as an actual server error.
app.Run(iris.Addr(":8080"), iris.WithoutServerError(iris.ErrServerClosed), iris.WithOptimizations)
app.Listen(":8080", iris.WithoutServerError(iris.ErrServerClosed), iris.WithOptimizations)
}