Commit 4b268c92 authored by Janoš Guljaš's avatar Janoš Guljaš Committed by GitHub

implement http.CloseNotifier to responseLogger for gorilla compress (#298)

* implement http.CloseNotifier to responseLogger for gorilla compress

* add skipcq for deepsource
parent 9b4531c9
...@@ -89,6 +89,12 @@ func (l *responseLogger) Flush() { ...@@ -89,6 +89,12 @@ func (l *responseLogger) Flush() {
l.w.(http.Flusher).Flush() l.w.(http.Flusher).Flush()
} }
func (l *responseLogger) CloseNotify() <-chan bool {
// staticcheck SA1019 CloseNotifier interface is required by gorilla compress handler
// nolint:staticcheck
return l.w.(http.CloseNotifier).CloseNotify() // skipcq: SCC-SA1019
}
func (l *responseLogger) Push(target string, opts *http.PushOptions) error { func (l *responseLogger) Push(target string, opts *http.PushOptions) error {
return l.w.(http.Pusher).Push(target, opts) return l.w.(http.Pusher).Push(target, opts)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment