afero icon indicating copy to clipboard operation
afero copied to clipboard

move fs implementations into sub packages

Open rgarcia opened this issue 8 years ago • 3 comments

Right now if I depend on github.com/spf13/afero, I also have to pull in a lot of potentially unnecessary dependencies that might not be related to the FS implementation I'm using, e.g. github.com/pkg/sftp.

Let me know if you agree and would be open to a PR.

rgarcia avatar May 18 '16 21:05 rgarcia

For reference, here's the current set of remote dependencies, do you know which would be trimmed?

$ go get -v github.com/spf13/afero

github.com/spf13/afero (download)
github.com/pkg/sftp (download)
github.com/kr/fs (download)
github.com/pkg/errors (download)
golang.org/x/crypto (download)
golang.org/x/text (download)

Godoc also has the imports and graph.

kofalt avatar May 20 '16 17:05 kofalt

The graph with std lib hidden is informative: https://godoc.org/github.com/spf13/afero?import-graph&hide=1

It looks like almost all of the third party deps fall from the sftp FS. This suggests the lowest hanging fruit might be to isolate the sftp implementation in the github.com/afero/sftp package.

rgarcia avatar May 20 '16 17:05 rgarcia

Works for me! I definitely support sub-packaging when implementations have unique import requirements. I'm also not the maintainer, though :smile:

kofalt avatar May 20 '16 19:05 kofalt