mirror of
https://github.com/documize/community.git
synced 2025-07-22 14:49:42 +02:00
Bumped underlying dependencies affecting database and LDAP connectivity. Bumped to Go v1.14.3 and released v3.8.0.
29 lines
616 B
Go
29 lines
616 B
Go
// +build go1.8
|
|
|
|
package handlers
|
|
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
)
|
|
|
|
type loggingResponseWriter interface {
|
|
commonLoggingResponseWriter
|
|
http.Pusher
|
|
}
|
|
|
|
func (l *responseLogger) Push(target string, opts *http.PushOptions) error {
|
|
p, ok := l.w.(http.Pusher)
|
|
if !ok {
|
|
return fmt.Errorf("responseLogger does not implement http.Pusher")
|
|
}
|
|
return p.Push(target, opts)
|
|
}
|
|
|
|
func (c *compressResponseWriter) Push(target string, opts *http.PushOptions) error {
|
|
p, ok := c.ResponseWriter.(http.Pusher)
|
|
if !ok {
|
|
return fmt.Errorf("compressResponseWriter does not implement http.Pusher")
|
|
}
|
|
return p.Push(target, opts)
|
|
}
|