hertz
hertz copied to clipboard
Embedding static files with StaticFS
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.