aohorodnyk / mimeheader

Library to work with MimeHeaders and other mime types. Library supports wildcards and parameters.
https://aohorodnyk.com/post/2021-07-03-mime-headers/
MIT License
24 stars 3 forks source link

Allow MimeHeaders to be returned from AcceptHeader #10

Closed Jake-Convictional closed 2 years ago

Jake-Convictional commented 2 years ago

Hi @aohorodnyk, thanks for the useful library!

It would be great if AcceptHeader.mheaders were exported so that we can invent our own custom negotiations while still using the parsing from your package. I'll put up a PR for your review.

Proposed change:

Current:

type AcceptHeader struct {
    mheaders []MimeHeader
}

Becomes:

type AcceptHeader struct {
    MHeaders []MimeHeader
}