mirror of
https://github.com/kataras/iris.git
synced 2025-12-20 11:27:06 +00:00
remove any reference to the pre go1.9 context.Context and replace with iris.Context on some places that were forgotten
got an email feedback about this Former-commit-id: b1caa261a0d425d8db2091bffb8cfd6065c4e1fa
This commit is contained in:
@@ -10,10 +10,6 @@ import (
|
||||
|
||||
"github.com/kataras/golog"
|
||||
"github.com/kataras/iris"
|
||||
// Note:
|
||||
// For some reason the latest vscode-go language extension does not provide enough intelligence (parameters documentation and go to definition features)
|
||||
// for the `iris.Context` alias, therefore if you use VS Code, import the original import path of the `Context`, that will do it:
|
||||
"github.com/kataras/iris/context"
|
||||
)
|
||||
|
||||
// A Broker holds open client connections,
|
||||
@@ -76,7 +72,7 @@ func (b *Broker) listen() {
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Broker) ServeHTTP(ctx context.Context) {
|
||||
func (b *Broker) ServeHTTP(ctx iris.Context) {
|
||||
// Make sure that the writer supports flushing.
|
||||
|
||||
flusher, ok := ctx.ResponseWriter().Flusher()
|
||||
@@ -172,7 +168,7 @@ func main() {
|
||||
}()
|
||||
|
||||
app := iris.New()
|
||||
app.Get("/", func(ctx context.Context) {
|
||||
app.Get("/", func(ctx iris.Context) {
|
||||
ctx.HTML(
|
||||
`<html><head><title>SSE</title>` + script + `</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user