-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
🐛 [Bug]: staticConfig.FS won't accept http.FileSystem in v3 #3136
Labels
Comments
Moving to core, doesnt belong here. |
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord |
@idearat Why not use |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Description
v3 removes the filesystem middleware and replaces it with static saying that static now does everything filesystem used to, however, you can't provide an http.FileSystem to the static.Config.FS parameter (what used to be 'Root'.
How to Reproduce
Steps to reproduce the behavior:
See the code snippets for a "v2 that works" and "v3 that doesn't" sample.
Expected Behavior
You should be able to replace filesystem.Config with static.Config without having to alter how you construct the embed you pass to it from an http.FileSystem to a non-http.FileSystem.
Template package Version
v3.0.0-beta.3
Code Snippet (optional)
The minimal changes I expected based on docs (simply replace filesystem with static... NotFoundFile with NotFoundHandler, etc... won't compile):
Here's the error which references the "API change" that's not something I expected:
The text was updated successfully, but these errors were encountered: