Add access to pusher

This commit is contained in:
Ruben Cid 2018-08-03 12:33:46 +02:00
parent 9dd7d19ce7
commit 48e6658eca
1 changed files with 8 additions and 0 deletions

View File

@ -244,3 +244,11 @@ func (r *Response) CloseNotify() <-chan bool {
}
return nil
}
// Pusher http.Pusher
func (r *Response) Pusher() (pusher http.Pusher) {
if pusher, ok := r.ResponseWriter.(http.Pusher); ok {
return pusher
}
return nil
}