mirror of
https://github.com/gin-gonic/gin.git
synced 2026-11-24 03:53:36 +08:00
fix(test): remove now-unused CloseNotify test shim
Stream no longer reads TestResponseRecorder.CloseNotify, so the closeChannel field and its CloseNotify/closeClient methods were dead code, tripping the unused linter.
This commit is contained in:
parent
049d789e48
commit
f803925709
@ -3246,21 +3246,11 @@ func TestContextRenderDataFromReaderNoHeaders(t *testing.T) {
|
||||
|
||||
type TestResponseRecorder struct {
|
||||
*httptest.ResponseRecorder
|
||||
closeChannel chan bool
|
||||
}
|
||||
|
||||
func (r *TestResponseRecorder) CloseNotify() <-chan bool {
|
||||
return r.closeChannel
|
||||
}
|
||||
|
||||
func (r *TestResponseRecorder) closeClient() {
|
||||
r.closeChannel <- true
|
||||
}
|
||||
|
||||
func CreateTestResponseRecorder() *TestResponseRecorder {
|
||||
return &TestResponseRecorder{
|
||||
httptest.NewRecorder(),
|
||||
make(chan bool, 1),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user