forked from forgejo/forgejo
Use vendored go-swagger (#8087)
* Use vendored go-swagger * vendor go-swagger * revert un wanteed change * remove un-needed GO111MODULE * Update Makefile Co-Authored-By: techknowlogick <matti@mdranta.net>
This commit is contained in:
parent
4cb1bdddc8
commit
9fe4437bda
686 changed files with 143379 additions and 17 deletions
29
vendor/github.com/gorilla/handlers/handlers_go18.go
generated
vendored
Normal file
29
vendor/github.com/gorilla/handlers/handlers_go18.go
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
// +build go1.8
|
||||
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type loggingResponseWriter interface {
|
||||
commonLoggingResponseWriter
|
||||
http.Pusher
|
||||
}
|
||||
|
||||
func (l *responseLogger) Push(target string, opts *http.PushOptions) error {
|
||||
p, ok := l.w.(http.Pusher)
|
||||
if !ok {
|
||||
return fmt.Errorf("responseLogger does not implement http.Pusher")
|
||||
}
|
||||
return p.Push(target, opts)
|
||||
}
|
||||
|
||||
func (c *compressResponseWriter) Push(target string, opts *http.PushOptions) error {
|
||||
p, ok := c.ResponseWriter.(http.Pusher)
|
||||
if !ok {
|
||||
return fmt.Errorf("compressResponseWriter does not implement http.Pusher")
|
||||
}
|
||||
return p.Push(target, opts)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue