mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
formatting
This commit is contained in:
parent
daab24eb2f
commit
3a7b411789
3 changed files with 17 additions and 22 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue