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

Add adapter to allow afero.Fs usage as io/fs.FS #291

Merged
merged 2 commits into from
Mar 20, 2021

Conversation

xakep666
Copy link
Contributor

@xakep666 xakep666 commented Mar 13, 2021

It will not affect users of go older than 1.16 because files with io/fs import marked with build constraints

Will close #275

@CLAassistant
Copy link

CLAassistant commented Mar 13, 2021

CLA assistant check
All committers have signed the CLA.

It will not affect users of go older than 1.16 because files with `io/fs` import marked with build constraints
afero.Fs/File requires mutating methods implementation but they will always return error because fs.FS is read-only.
ReadAt and Seek will return error if underlying fs.File doesn't implement them.
@0xmichalis 0xmichalis merged commit b9650fb into spf13:master Mar 20, 2021
@0xmichalis
Copy link
Collaborator

Released as part of https://github.com/spf13/afero/releases/tag/v1.6.0

@xakep666 xakep666 deleted the feature/iofs branch March 20, 2021 18:07
@jeffwidman
Copy link
Contributor

jeffwidman commented Mar 25, 2021

It will not affect users of go older than 1.16 because files with io/fs import marked with build constraints

Unfortunately, that's not entirely true... see golang/go#44557

I'm not saying you should revert, just that end users need go >= 1.15.10 which includes the backported fix... but did want to make folks aware.

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

Successfully merging this pull request may close these issues.

go 1.16 compatibility
4 participants