github.com/hellobchain/third_party@v0.0.0-20230331131523-deb0478a2e52/go-chi/chi/middleware/compress18.go (about)

     1  //go:build go1.8 || appengine
     2  // +build go1.8 appengine
     3  
     4  package middleware
     5  
     6  import (
     7  	"errors"
     8  
     9  	"github.com/hellobchain/newcryptosm/http"
    10  )
    11  
    12  func (w *maybeCompressResponseWriter) Push(target string, opts *http.PushOptions) error {
    13  	if ps, ok := w.w.(http.Pusher); ok {
    14  		return ps.Push(target, opts)
    15  	}
    16  	return errors.New("chi/middleware: http.Pusher is unavailable on the writer")
    17  }