Skip to content
Myr

rename variable because collide with the imported package name (#3298)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* rename variable because collide with the imported package name * handle unhandled error in context_1.17_test.go

authored by Amir Hossein · committed by GitHub · parent 0128d74 · Browse files · 2 files+8 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+8 added−3 removed

  • other:+8 added−3 removed

2 files+8 added−3 removed

modified:context_1.17_test.go+6 added-1 removed
28 unmodified lines
2930func TestContextFormFileFailed17(t *testing.T) {31 buf := new(bytes.Buffer)32 mw := multipart.NewWriter(buf)33 defer func(mw *multipart.Writer) {33 mw.Close()34 err := mw.Close()35 if err != nil {36 assert.Error(t, err)37 }38 }(mw)39 c, _ := CreateTestContext(httptest.NewRecorder())40 c.Request, _ = http.NewRequest("POST", "/", nil)41 c.Request.Header.Set("Content-Type", mw.FormDataContentType())42 c.engine.MaxMultipartMemory = 8 << 20
35 unmodified lines
modified:gin_test.go+2 added-2 removed
98 unmodified lines
99 defer ln.Close()100101 url := "http://" + ln.Addr().String() + "/"102103 http := http.Client{103 httpClient := http.Client{104 Transport: &http2.Transport{105 AllowHTTP: true,106 DialTLS: func(netw, addr string, cfg *tls.Config) (net.Conn, error) {107 return net.Dial(netw, addr)108 },109 },110 }111112 res, err := http.Get(url)112 res, err := httpClient.Get(url)113 if err != nil {114 fmt.Println(err)115 }116
582 unmodified lines