0
0
mirror of https://github.com/rls-moe/nyx synced 2024-09-28 16:03:47 +02:00
nyx/vendor/github.com/pressly/chi/middleware/compress18.go
2017-03-12 20:37:53 +01:00

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")
}