News for hackers. Stuff that matters.
Re:Show HN: email - Send emails easily in Go by dradtke on Tuesday January 07, 2014 @05:57PM (#7020602)
Looks interesting. A couple suggestions:

1. People have already suggested this, but it would make more sense to make users call email.New() rather than email.NewEmail().

2. Alternatively, since the user will be populating a bunch of values anyway, it might make more sense to tell users to create a message like

    e := &email.Email{
        From: "Jordan Wright <[email protected]>",
        To: []string{"[email protected]"},
        ...
    }
and then, if a value hasn't been set for it, use a default value for Headers in the send method.
Re:Show HN: email - Send emails easily in Go by jwcrux on Tuesday January 07, 2014 @06:39PM (#7020792)
With regards to 1, it seems like I'm stuck between a rock and a hard place. I originally made the package in accordance to the docs I read which stated that if you are exporting more than one type, use NewType(). Now that so many people are using the package, I'd hate to make changes that would break it unless necessary.

However, with that being said, 2 might solve that issue. I'll add an example this evening showing how to also create an email in one pass using an example similar to yours.

Thanks for the suggestions!