1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 11:55:40 +01:00

formatting

This commit is contained in:
JanHoefelmeyer 2023-09-08 13:34:45 +02:00
parent daab24eb2f
commit 3a7b411789
3 changed files with 17 additions and 22 deletions

View file

@ -9,18 +9,17 @@
package misc
import (
"testing"
"bytes"
"mime/multipart"
"testing"
)
// CreateFormFile creates an [io.Writer] like [mime/multipart.Writer.CreateFromFile].
// This version allows to set the mime type, too.
func TestCreateFormFile( t *testing.T) {
func TestCreateFormFile(t *testing.T) {
body := new(bytes.Buffer)
writer := multipart.NewWriter(body)
_, err := CreateFormFile(writer, "csaf", "data", "application/json")
if err != nil {
t.Errorf("failed to create an io.Writer via CreateFormFile")