Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export coding package? #277

Closed
usedbytes opened this issue Feb 7, 2023 · 1 comment
Closed

Export coding package? #277

usedbytes opened this issue Feb 7, 2023 · 1 comment

Comments

@usedbytes
Copy link
Contributor

What I did:

Tried to decode RFC2047 headers

What I expected:

To be able to use the comprehensive RFC2047 decoder in internal/coding

What I got:

Unable to import internal module.

I see that the internal/coding package was made in #212, but the functionality looks extremely useful (and would solve a use-case for me). I see that I can access decoded headers via Envelope.GetHeader()/DecodeHeaders(), but what I really need is just coding.RFC2047Decode() rather than populating an Envelope or parsing from []byte.

Is there a strong reason for coding being internal, and/or would you consider exposing RFC2047Decode() in a non-internal package?

Thanks for your work on enmime! It's saved me a lot of head-scratching.

@usedbytes usedbytes changed the title Export coding module? Export coding package? Feb 7, 2023
@jhillyerd
Copy link
Owner

Yeah, I'd be OK with having enmime.RFC2047Decode (or perhaps DecodeRFC2047) that calls the internal package. I don't want to expose the rest of it though.

usedbytes added a commit to usedbytes/enmime that referenced this issue Feb 12, 2023
Exports coding.RFC2047Decode(), making the large set of charsets more
readily available for package users.
jhillyerd pushed a commit that referenced this issue Feb 12, 2023
Exports coding.RFC2047Decode(), making the large set of charsets more
readily available for package users.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants