Closed rlsvr closed 1 year ago
go run main.go
./main.go:9:11: ctx.Closed undefined (type "github.com/go-mojito/mojito/websocket".Context has no field or method Closed)
Able to compile.
0.0.16
package main import "github.com/go-mojito/mojito" import websocket "github.com/go-mojito/mojito/websocket" func SomeHandler(ctx websocket.Context) { for !ctx.Closed() { var msg string ctx.Receive(&msg) ctx.Send(msg) } } func main() { mojito.GET("/", func(ctx mojito.Context) { ctx.String("Hello World") }) mojito.GET("/ws", SomeHandler) mojito.ListenAndServe(":8123") }
Thank you for reporting, I was able to reproduce this issue and a fix is in progress!
I have created a new release v0.0.17 which contains the fix
v0.0.17
Thank you!
Description
go run main.go
command-line-arguments
./main.go:9:11: ctx.Closed undefined (type "github.com/go-mojito/mojito/websocket".Context has no field or method Closed)
How to Reproduce
Expected Behavior
Able to compile.
Version
0.0.16
Code Snippet
Checklist: