neljapäev, 6. aprill 2017 14:51.13 UTC+3 kirjutas Konstantin Khomoutov:
>
> On Thu, 6 Apr 2017 04:00:20 -0700 (PDT) 
> Ain <ain.v...@gmail.com <javascript:>> wrote: 
>
> > 
> > ie there are some headers and then base64 encoded data. I suspect 
> > there might be some functions in the std lib which should be able to 
> > parse this and give me easy access to the headers and data but I just 
> > can't find it... it isn't mime/multipart, right? Perhaps something 
> > in the http client package? 
>
> Almost. 
>
> What you're dealing with is a typical set of headers of a so-called 
> "MIME-formatted" e-mail message followed by its body.  The usual set of 
> headers is missing (those 'From', 'To' etc) and that's why it looks 
> strange. 
>
> So you parse it like a regular mail message using the net/mail package 
> and then base64-decode its body. 
>
> The program (playground link is [1]) 
>


Thank you, that's exactly what I was looking for!


ain

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to