You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
314 B
Go
16 lines
314 B
Go
// +build go1.8
|
|
|
|
package middleware
|
|
|
|
import (
|
|
"errors"
|
|
"net/http"
|
|
)
|
|
|
|
func (w *maybeCompressResponseWriter) Push(target string, opts *http.PushOptions) error {
|
|
if ps, ok := w.w.(http.Pusher); ok {
|
|
return ps.Push(target, opts)
|
|
}
|
|
return errors.New("chi/middleware: http.Pusher is unavailable on the writer")
|
|
}
|