Newer
Older
minecraft-ui / vendor / github.com / go-chi / chi / middleware / compress18.go
Simon Lindgren on 10 Mar 2018 314 bytes first commit
// +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")
}