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

Commits on Mar 13, 2021

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

    It will not affect users of go older than 1.16 because files with `io/fs` import marked with build constraints
    xakep666 committed Mar 13, 2021
    Configuration menu
    Copy the full SHA
    c597fe5 View commit details
    Browse the repository at this point in the history
  2. Add reverse wrapper from io.FS to afero.Fs

    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.
    xakep666 committed Mar 13, 2021
    Configuration menu
    Copy the full SHA
    164e24d View commit details
    Browse the repository at this point in the history