1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-26 10:01:28 +00:00

Merge pull request #3280 from GNURub/feature/pusher

Add access to pusher
This commit is contained in:
astaxie 2018-08-07 09:58:56 +08:00 committed by GitHub
commit bf0d40bca6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}