mirror of
https://github.com/labstack/echo.git
synced 2025-03-25 21:38:56 +02:00
fixing websocket recipe
This commit is contained in:
parent
3c917b4c11
commit
f9a7f46edc
@ -1,6 +1,8 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
"github.com/labstack/echo"
|
"github.com/labstack/echo"
|
||||||
mw "github.com/labstack/echo/middleware"
|
mw "github.com/labstack/echo/middleware"
|
||||||
"golang.org/x/net/websocket"
|
"golang.org/x/net/websocket"
|
||||||
@ -24,7 +26,7 @@ func main() {
|
|||||||
if err = websocket.Message.Receive(ws, &msg); err != nil {
|
if err = websocket.Message.Receive(ws, &msg); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
println(msg)
|
fmt.Println(msg)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user