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

Accept io.Reader for Attach and Embed #78

Closed
wants to merge 1 commit into from

Conversation

arbarlow
Copy link

Here's a patch that will accept an io.Reader for both Attach and Embed with accompanying tests.

I kept the original methods named as Attach and added AttachReader though it is up for discussion!

I feel in Go the idiomatic thing would be to have

Attach(name string, r io.Reader, settings ...FileSetting)

and

AttachFile(filename string, settings ...FileSetting)

So that AttachFile is really only a convenience method. I think most people in Go would be using something io.Reader compatible?

But it works for the time being and it's sufficient enough

I wanted to add an example to the example file. But since it's pointing to a gopkg.in version that couldn't be possible at the moment without breaking the test suite.

This is talked about in issue #69

@arbarlow
Copy link
Author

@alexcesaro what can I do to help have this merged?

@limoli
Copy link

limoli commented Nov 5, 2018

Why are you waiting to merge this?

@pedromorgan
Copy link

see #104 (Maintainer missing) and #108

ivy added a commit to go-mail/mail that referenced this pull request Nov 10, 2018
@arbarlow arbarlow closed this Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants