diff --git a/playground/http/upload_test.go b/playground/http/upload_test.go index 4338e04..180c032 100644 --- a/playground/http/upload_test.go +++ b/playground/http/upload_test.go @@ -26,11 +26,11 @@ func TestUploadFormFile(t *testing.T) { body := new(bytes.Buffer) //body := &bytes.Buffer{} writer := multipart.NewWriter(body) - formFile, err := writer.CreateFormFile("file", filepath.Base(filePath)) + formFileWriter, err := writer.CreateFormFile("file", filepath.Base(filePath)) if err != nil { t.Fatal(err) } - if _, err = io.Copy(formFile, bytes.NewReader(yamlFile)); err != nil { + if _, err = io.Copy(formFileWriter, bytes.NewReader(yamlFile)); err != nil { t.Fatal(err) } writer.Close()