Fix golangci-lint issues

This commit is contained in:
ChenPuChu 2024-11-21 10:12:02 +00:00
parent 87ce468c78
commit fc1a19e6cc
1 changed files with 2 additions and 2 deletions

View File

@ -167,7 +167,7 @@ func TestSaveUploadedFileWithPermission(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
mw.Close() mw.Close()
c, _ := CreateTestContext(httptest.NewRecorder()) c, _ := CreateTestContext(httptest.NewRecorder())
c.Request, _ = http.NewRequest("POST", "/", buf) c.Request, _ = http.NewRequest(http.MethodPost,, "/", buf)
c.Request.Header.Set("Content-Type", mw.FormDataContentType()) c.Request.Header.Set("Content-Type", mw.FormDataContentType())
f, err := c.FormFile("file") f, err := c.FormFile("file")
require.NoError(t, err) require.NoError(t, err)
@ -188,7 +188,7 @@ func TestSaveUploadedFileWithPermissionFailed(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
mw.Close() mw.Close()
c, _ := CreateTestContext(httptest.NewRecorder()) c, _ := CreateTestContext(httptest.NewRecorder())
c.Request, _ = http.NewRequest("POST", "/", buf) c.Request, _ = http.NewRequest(http.MethodPost, "/", buf)
c.Request.Header.Set("Content-Type", mw.FormDataContentType()) c.Request.Header.Set("Content-Type", mw.FormDataContentType())
f, err := c.FormFile("file") f, err := c.FormFile("file")
require.NoError(t, err) require.NoError(t, err)