From 722b26f240a944996f432e8d80081eb026261ede Mon Sep 17 00:00:00 2001 From: malta895 Date: Mon, 2 Oct 2023 22:52:51 +0200 Subject: [PATCH] fix: apply suggestions from code review --- src/mime/multipart/writer.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mime/multipart/writer.go b/src/mime/multipart/writer.go index d9261b8318252b..0feed740e3adeb 100644 --- a/src/mime/multipart/writer.go +++ b/src/mime/multipart/writer.go @@ -152,15 +152,15 @@ func (w *Writer) CreateFormField(fieldname string) (io.Writer, error) { return w.CreatePart(h) } -// FileContentDisposition creates a form-data Content-Disposition header contents -// using the provided field name and file name. +// FileContentDisposition returns the value of a Content-Disposition header +// with the provided field name and file name. func FileContentDisposition(fieldname, filename string) string { return fmt.Sprintf(`form-data; name="%s"; filename="%s"`, escapeQuotes(fieldname), escapeQuotes(filename)) } -// FieldContentDisposition creates a form-data Content-Disposition header contents -// using the provided field name +// FieldContentDisposition returns the value of a Content-Disposition header +// with the provided field name. func FieldContentDisposition(fieldname string) string { return fmt.Sprintf(`form-data; name="%s"`, escapeQuotes(fieldname))