mirror of
https://github.com/gin-gonic/gin.git
synced 2026-11-24 03:53:36 +08:00
style: gofmt/gofumpt response_writer hijack changes
Group error vars and drop the extra blank line so golangci-lint passes.
This commit is contained in:
parent
bc80509535
commit
aae95f9c41
@ -17,8 +17,10 @@ const (
|
||||
defaultStatus = http.StatusOK
|
||||
)
|
||||
|
||||
var errHijackAlreadyWritten = errors.New("gin: response body already written")
|
||||
var errHijacked = errors.New("gin: connection hijacked")
|
||||
var (
|
||||
errHijackAlreadyWritten = errors.New("gin: response body already written")
|
||||
errHijacked = errors.New("gin: connection hijacked")
|
||||
)
|
||||
|
||||
// ResponseWriter ...
|
||||
type ResponseWriter interface {
|
||||
|
||||
@ -300,7 +300,6 @@ func TestResponseWriterWriteAfterHijack(t *testing.T) {
|
||||
assert.Equal(t, 0, hijacker.Body.Len())
|
||||
}
|
||||
|
||||
|
||||
func TestResponseWriterFlush(t *testing.T) {
|
||||
testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
writer := &responseWriter{}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user