rfc2822 parser for go

854 views
Skip to first unread message

Eric Evans

unread,
Jun 2, 2011, 4:54:00 PM6/2/11
to golan...@googlegroups.com
I recently wrote a parser for RFC 2822 formatted messages, which can
be found here:

https://github.com/eevans/rfc2822

This is my first project in Go, so any feedback would be very appreciated.

Thanks!

--
Eric Evans
john.er...@gmail.com

Brad Fitzpatrick

unread,
Jun 2, 2011, 5:00:52 PM6/2/11
to Eric Evans, golang-nuts
Have you seen the new mail package?


Notice that it just uses the "textproto" package's reader, which has a "ReadMIMEHeader" method.  Anyway, you might want to contribute to mail if you need additional functionality.

Btw, RFCs are often updated & replaced with new RFCs.  Naming a package with a number will date it quickly, like my brother's Twitter handle with his birth year at the end.  :-)

Brad Fitzpatrick

unread,
Jun 2, 2011, 5:03:06 PM6/2/11
to Eric Evans, golang-nuts
On Thu, Jun 2, 2011 at 2:00 PM, Brad Fitzpatrick <brad...@golang.org> wrote:
Have you seen the new mail package?

Eric Evans

unread,
Jun 2, 2011, 5:16:18 PM6/2/11
to golang-nuts
On Thu, Jun 2, 2011 at 4:00 PM, Brad Fitzpatrick <brad...@golang.org> wrote:
> Have you seen the new mail package?
> http://code.google.com/p/go/source/detail?r=eeec101009c3#
> Notice that it just uses the "textproto" package's reader, which has a
> "ReadMIMEHeader" method. Anyway, you might want to contribute to mail if
> you need additional functionality.

No, I wasn't aware of this. Thanks.

> Btw, RFCs are often updated & replaced with new RFCs. Naming a package with
> a number will date it quickly, like my brother's Twitter handle with his
> birth year at the end. :-)

Good point. :)

> On Thu, Jun 2, 2011 at 1:54 PM, Eric Evans <john.er...@gmail.com>
> wrote:
>>
>> I recently wrote a parser for RFC 2822 formatted messages, which can
>> be found here:
>>
>> https://github.com/eevans/rfc2822
>>
>> This is my first project in Go, so any feedback would be very appreciated.

--
Eric Evans
john.er...@gmail.com

Stefan Scholl

unread,
Jun 3, 2011, 2:50:59 AM6/3/11
to golan...@googlegroups.com
Brad Fitzpatrick <brad...@golang.org> wrote:
> [-- text/plain, encoding 7bit, charset: UTF-8, 8 lines --]

Strange how both packages don't use ebnf. Read the subject and
thought I could see a good example of ebnf usage, given that the
format is defined in EBNF.

ceving

unread,
Jun 3, 2011, 5:25:36 AM6/3/11
to golang-nuts
On 3 Jun., 08:50, Stefan Scholl <ste...@no-spoon.de> wrote:
>
> Strange how both packages don't use ebnf. Read the subject and
> thought I could see a good example of ebnf usage, given that the
> format is defined in EBNF.

The ebnf package is pretty useless as long as the grammar can not be
used to build a parser.

Arlen Cuss

unread,
Jun 5, 2011, 11:22:55 PM6/5/11
to Brad Fitzpatrick, Eric Evans, golang-nuts

> Btw, RFCs are often updated & replaced with new RFCs. Naming a
> package with a number will date it quickly, like my brother's Twitter
> handle with his birth year at the end. :-)

Well, so long as your brother's birth year never changes ...

--
Arlen Cuss
Software Engineer

Phone: +61 3 9877 9921
Email: ar...@noblesamurai.com

Noble Samurai Pty Ltd
Level 1, 234 Whitehorse Rd
Nunawading, Victoria, 3131, Australia

noblesamurai.com | arlen.co

signature.asc
Reply all
Reply to author
Forward
0 new messages