Skip to content

Commit

Permalink
fix: apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
malta895 committed Oct 2, 2023
1 parent d3b4d1c commit 722b26f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/mime/multipart/writer.go
Expand Up @@ -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))
Expand Down

0 comments on commit 722b26f

Please sign in to comment.