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

Embedding static files with StaticFS #324

Closed
radioinmyhead opened this issue Oct 27, 2022 · 1 comment
Closed

Embedding static files with StaticFS #324

radioinmyhead opened this issue Oct 27, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@radioinmyhead
Copy link

I have some static files that need to be downloaded, such as *.js or *.html, and I want to embed them in the go binary with StaticFS to simplify my deployment.

I would like to make StaticFS work with "go embed", but that is different from hertz's current design.

The function definition of StaticFS is func (group *RouterGroup) StaticFS(relativePath string, fs *app.FS) IRoutes . The app.FS is a struct not interface, I want to use fs.FS instead of it.

@welkeyever welkeyever added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Oct 27, 2022
@li-jin-gou li-jin-gou self-assigned this Dec 5, 2022
@li-jin-gou li-jin-gou added enhancement New feature or request and removed NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. labels Dec 8, 2022
@li-jin-gou
Copy link
Member

same to #630

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants