go-bridge icon indicating copy to clipboard operation
go-bridge copied to clipboard

I encounted the error "*bridge.ResponseWriter is not http.Flusher: missing method Flush"

Open flyingpot opened this issue 1 year ago • 0 comments

I use gin framework and call gin.Context.Writer.Flush method. Yesterday the flush run well, but today it throws below error:

[31m2023/06/23 06:50:16 [Recovery] 2023/06/23 - 06:50:16 panic recovered:
interface conversion: *bridge.ResponseWriter is not http.Flusher: missing method Flush
/vercel/path0/.vercel/cache/golang/src/runtime/iface.go:92 (0x40c364)
/vercel/path0/.vercel/cache/golang/src/runtime/iface.go:429 (0x40d1dc)
/vercel/go/pkg/mod/github.com/gin-gonic/[email protected]/response_writer.go:123 (0xa70a18)
/vercel/path0/api/handler.go:328 (0xa7b3af)

Is this error related to the change of golang runtime? Or maybe it's better to add a Flush implementation in bridge.ResponseWriter

flyingpot avatar Jun 23 '23 06:06 flyingpot