Skip to content

add a mime/multipart.Writer #1823

@bradfitz

Description

@bradfitz
We need the mime/multipart Writer half.


something like....

package multipart

// Writer creates new multipart messages.
type Writer struct {
    Boundary string

    w io.Writer 
}

// NewWriter returns a new Writer with a random boundary.
func NewWriter(w io.Writer) *Writer {
   ...
}

func (w *Writer) Write(p *Part) os.Error {
...
}

func (w *Writer) Close() os.Error {

}

func NewPart(header textproto.MIMEHeader, body io.Reader) *Part {
}

// NewFilePart is a convenience wrapper around NewPart.
func NewFilePart(formName, fileName string, body io.Reader) *Part {

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions