github.com/hellobchain/third_party@v0.0.0-20230331131523-deb0478a2e52/gorilla/handlers/handlers_go18.go (about)

     1  //go:build go1.8
     2  // +build go1.8
     3  
     4  package handlers
     5  
     6  import (
     7  	"fmt"
     8  	"github.com/hellobchain/newcryptosm/http"
     9  )
    10  
    11  type loggingResponseWriter interface {
    12  	commonLoggingResponseWriter
    13  	http.Pusher
    14  }
    15  
    16  func (l *responseLogger) Push(target string, opts *http.PushOptions) error {
    17  	p, ok := l.w.(http.Pusher)
    18  	if !ok {
    19  		return fmt.Errorf("responseLogger does not implement http.Pusher")
    20  	}
    21  	return p.Push(target, opts)
    22  }