使用Golang解析电子邮件字段

I am trying to parse my emails in Go and I need help.

How to get access to Content-type field of mail?

    cmd, _ = c.Fetch(set, "BODY[HEADER]", "BODY[1]")
    for cmd.InProgress() {
    for _, rsp = range cmd.Data {
        header := imap.AsBytes(rsp.MessageInfo().Attrs["BODY[HEADER]"])
        body := imap.AsString(rsp.MessageInfo().Attrs["BODY[1]"])
        if msg, _ := mail.ReadMessage(bytes.NewReader(header)); msg != nil {

with this I can gain access to Body and Header, but when email contain included file then with BODY[1] I have all meta-data, not only pure text. To avoid that I can use BODY[1.1], but I need condition by Content-Type:[multipart/alternative] and I can't gain access ot that field.

Ok, so i figured it out by my self. But anyway, maybe someone else interested in that. You can have access to varios fields of mail by

msg.Header.Get("Content-type")

and instead of Content-type you can put any header part name.

fmt.println(msg)

to know what name fields it have