afero icon indicating copy to clipboard operation
afero copied to clipboard

Enable afero to be used on zos

Open danmillwood opened this issue 3 years ago • 1 comments

Hello, Id like to contribute changes that enable afero to be used for go applications running on the zos operating system. The changes are all build tag related.

There are two commits: The first of these adds build tags to const_bsds.go and const_win_unix.go to enable afero to compile on zos. The second of these disables build of the sftpfs package files for zos. This is because github.com/pkg/sftp does not yet run on zos and this was causing unit test failures in afero.

I have run the unit tests on zos

:>go version
go version go1.16.5 zos/s390x
:>go clean --cache --modcache --testcache
:>go test ./...
go: downloading golang.org/x/text v0.3.3
ok  	github.com/spf13/afero	5.238s
ok  	github.com/spf13/afero/mem	0.357s
ok  	github.com/spf13/afero/tarfs	0.135s
ok  	github.com/spf13/afero/zipfs	0.140s

I've also run the unit tests on my Mac and they all pass

afero % go clean --cache --modcache --testcache
afero % go test ./...
go: downloading github.com/pkg/sftp v1.10.1
go: downloading golang.org/x/text v0.3.3
go: downloading golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586
go: downloading github.com/pkg/errors v0.8.1
go: downloading github.com/kr/fs v0.1.0
ok  	github.com/spf13/afero	5.306s
ok  	github.com/spf13/afero/mem	0.582s
ok  	github.com/spf13/afero/sftpfs	6.445s
ok  	github.com/spf13/afero/tarfs	0.850s
ok  	github.com/spf13/afero/zipfs	0.503s

danmillwood avatar Jun 09 '21 08:06 danmillwood

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jun 09 '21 08:06 CLAassistant

Closing as this has now been added

danmillwood avatar Mar 09 '23 10:03 danmillwood