gin icon indicating copy to clipboard operation
gin copied to clipboard

missing method CloseNotify

Open kooksee opened this issue 3 years ago • 2 comments

error message

interface conversion: *middle.timeoutWriter is not http.CloseNotifier: missing method CloseNotify

I encountered a missing method closenotify error. After troubleshooting, I found that there was a mandatory type assertion in gin https://github.com/gin-gonic/gin/blob/464535ff94799b012f90f15edcffd32e4abe32fa/response_writer.go#L112

As shown below image image image

If w no http.Closenotifier is implemented, there is a problem with the forced conversion of http.Closenotifier

kooksee avatar Oct 20 '21 06:10 kooksee

any plan to fix it?

sunburst-yz avatar Feb 14 '23 16:02 sunburst-yz

http.Closenotifier the CloseNotifier interface predates Go's context package. any plan to remove this interface?

ZooDoz avatar Jan 19 '24 07:01 ZooDoz