-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Use http.FileSystem for all the things #144
Conversation
It looks like the build is failing due to Cassandra, not necessarily this change. I’ve been able to use it locally in a project and it works as expected. How would I be able to tell? |
Add tests |
Please address the issues I've raised here. It's fine to address those issues as a comment in this PR. e.g. doesn't need to be a comment in that github issue. I don't see WebDAV source driver implementing the |
I ran my own tests locally. I also ran your tests locally. The tests that are failing are something about a Cassandra timeout, which seems unrelated. Adding my own tests will not solve that problem as I don't use Cassandra and I wouldn't know how to test this specific functionality more than you and I already have.
This PR is a direct response to those issues. Please take a look at the code. The purpose of the code is to illustrate that by using Go's http.FileSystem` interface you support almost every file module that exists - including Packr. WebDAV, the network transfer protocol, is not useful for this. However, the |
We need tests for each source driver. Relying on existing tests to catch issues is not sufficient since we need to know if the driver we're depending on works or breaks with an update.
Ahh, I see now! Are you familiar with other FS interfaces? I find it odd to use an FS interface from the |
I would like to encourage you two somehow resolve this. http.Filesystem is the de-facto standard. You should not really look at it as http. It really relies on os.File interface really, but it limits it down to only few functions. It was first used in web world, so that's why http, but since it has been used in many other projects. The real reason for me adding a vote here is that I too want to use esc since go-binddata is deprecated. So just like @smacker in his lookout project, I would very much like to see support for esc or better, support for any provider of http.Filesystem interface. |
To be clear, implementing the The blockers for this PR are:
I don't have the bandwidth to make these changes myself, so feel free to open a PR to resolve the blockers mentioned above. |
@mikijov Thanks for providing background on how |
I want to do another PR with the requested changes, but I haven't had the time and so I've just been using my own fork. However, I don't intend to maintain a fork long-term. |
Any update on this? Would love to see it merged to enable the use all the different |
Anything I can help with here? I'd really love to get this in as well 🤞 |
Closed in favor of #293 |
This shows how it's possible to use http.FileSystem for: