Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a mime/multipart.Writer #1823

Closed
bradfitz opened this issue May 13, 2011 · 2 comments
Closed

add a mime/multipart.Writer #1823

bradfitz opened this issue May 13, 2011 · 2 comments

Comments

@bradfitz
Copy link
Contributor

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 {
@bradfitz
Copy link
Contributor Author

Comment 1:

Actually, per the mailing list discussion, probably something like:
func (w *Writer) CreatePart(header textproto.MIMEHeader) io.WriteCloser

@bradfitz
Copy link
Contributor Author

Comment 2:

This issue was closed by revision b22151f.

Status changed to Fixed.

@bradfitz bradfitz self-assigned this May 20, 2011
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants