vendor/github.com/gorilla/handlers/handlers_go18.go
raw| 1 | // +build go1.8 |
| 2 | |
| 3 | package handlers |
| 4 | |
| 5 | import ( |
| 6 | "fmt" |
| 7 | "net/http" |
| 8 | ) |
| 9 | |
| 10 | type loggingResponseWriter interface { |
| 11 | commonLoggingResponseWriter |
| 12 | http.Pusher |
| 13 | } |
| 14 | |
| 15 | func (l *responseLogger) Push(target string, opts *http.PushOptions) error { |
| 16 | p, ok := l.w.(http.Pusher) |
| 17 | if !ok { |
| 18 | return fmt.Errorf("responseLogger does not implement http.Pusher") |
| 19 | } |
| 20 | return p.Push(target, opts) |
| 21 | } |