ictgj-voting/vendor/github.com/gorilla/handlers/handlers_go18.go

22 lines
368 B
Go
Raw Permalink Normal View History

2017-07-13 11:43:04 +00:00
// +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)
}