diff options
| author | Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> | 2024-07-01 13:00:39 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-01 01:00:39 -0700 |
| commit | 5ffacbb6eacaad6ea9558d18f9c62be2a3c4e18f (patch) | |
| tree | bf5797c6b002d953d03ae68fa37c7c4be7fabc40 /unmaintained | |
| parent | 0fdf7eca48892b5c6d12c1c96563755945331f16 (diff) | |
| download | seaweedfs-5ffacbb6eacaad6ea9558d18f9c62be2a3c4e18f.tar.xz seaweedfs-5ffacbb6eacaad6ea9558d18f9c62be2a3c4e18f.zip | |
refactor all methods strings to const (#5726)
Diffstat (limited to 'unmaintained')
| -rw-r--r-- | unmaintained/stress_filer_upload/bench_filer_upload/bench_filer_upload.go | 2 | ||||
| -rw-r--r-- | unmaintained/stress_filer_upload/stress_filer_upload_actual/stress_filer_upload.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/unmaintained/stress_filer_upload/bench_filer_upload/bench_filer_upload.go b/unmaintained/stress_filer_upload/bench_filer_upload/bench_filer_upload.go index 1767b04b2..7700a6dce 100644 --- a/unmaintained/stress_filer_upload/bench_filer_upload/bench_filer_upload.go +++ b/unmaintained/stress_filer_upload/bench_filer_upload/bench_filer_upload.go @@ -115,7 +115,7 @@ func uploadFileToFiler(client *http.Client, data []byte, filename, destination s uri := destination + filename - request, err := http.NewRequest("POST", uri, body) + request, err := http.NewRequest(http.MethodPost, uri, body) request.Header.Set("Content-Type", writer.FormDataContentType()) // request.Close = true // can not use this, which do not reuse http connection, impacting filer->volume also. diff --git a/unmaintained/stress_filer_upload/stress_filer_upload_actual/stress_filer_upload.go b/unmaintained/stress_filer_upload/stress_filer_upload_actual/stress_filer_upload.go index afcd51917..c8d36053b 100644 --- a/unmaintained/stress_filer_upload/stress_filer_upload_actual/stress_filer_upload.go +++ b/unmaintained/stress_filer_upload/stress_filer_upload_actual/stress_filer_upload.go @@ -130,7 +130,7 @@ func uploadFileToFiler(client *http.Client, filename, destination string) (size uri := destination + file.Name() - request, err := http.NewRequest("POST", uri, body) + request, err := http.NewRequest(http.MethodPost, uri, body) request.Header.Set("Content-Type", writer.FormDataContentType()) resp, err := client.Do(request) |
