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

Allow direct embedding of embed.FS files #29

Closed
wneessen opened this issue Jul 1, 2022 · 0 comments
Closed

Allow direct embedding of embed.FS files #29

wneessen opened this issue Jul 1, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@wneessen
Copy link
Owner

wneessen commented Jul 1, 2022

Is your feature request related to a problem? Please describe.

In this discussion: #27 (reply in thread) I was made aware, that users might want to embed/attach files via embed.FS - meaning files that are directly shipped in the go binary. This is currently possible via opening the embed.FS file and then using EmbedReader. We might consider adding direct embed.FS support for ease of use.

Describe the solution you'd like

I see two possible solutions:

  • Add two new EmbedEmbedFSFile() and AttachEmbedFSFile() methods
  • Add a new FileOption that hands over the embed.FS to either EmbedFile() and AttachFile() methods that then decide from where to fetch the file.

Describe alternatives you've considered

No response

Additional context

No response

@wneessen wneessen added the enhancement New feature or request label Jul 1, 2022
wneessen added a commit that referenced this issue Jul 7, 2022
Closes #29: Allow attaching/embedding from embed.FS
wneessen added a commit that referenced this issue Jul 7, 2022
#29: Mention the different the embed/attach methods we support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant