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

Use spf13/afero or provide a compatibility layer? #64

Open
purpleidea opened this issue Nov 17, 2018 · 4 comments
Open

Use spf13/afero or provide a compatibility layer? #64

purpleidea opened this issue Nov 17, 2018 · 4 comments

Comments

@purpleidea
Copy link

I use https://github.com/spf13/afero/ in a number of ways. I wanted to use https://github.com/src-d/go-git/ with that as the backing filesystem. As a result, I'd have to either switch to this, or implement a compatibility layer. Since the former is not possible, I think the later might be a good approach.

I'm opening this issue to track that progress. Basically we should have a helper function which takes a fileystem from afero and returns something that implements this interface. That should probably be in the afero lib, and the opposite should be here.

@purpleidea purpleidea changed the title Use spf13/afero or provide a compatbilitiy layer? Use spf13/afero or provide a compatibility layer? Nov 17, 2018
@mcuadros
Copy link
Contributor

@purpleidea I recommend implementing a billy.Filesystem on top of an afero one. We are open for PRs

@twpayne
Copy link

twpayne commented Dec 18, 2018

FWIW I implemented this Afero compatibility for go-vfs with go-vfsafero using exactly the idea that @purpleidea describes here.

@jfontan
Copy link
Contributor

jfontan commented Dec 18, 2018

I've started a go-billy fs that uses afero as a backend. Still needs documentation but you should be able to wrap it with:

billyfs := desfacer.New(aferofs)

https://github.com/jfontan/go-billy-desfacer

@grzesiek
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants