Closed sagikazarmark closed 11 months ago
👋 Thanks for contributing to Viper! You are awesome! 🎉
A maintainer will take a look at your pull request shortly. 👀
In the meantime: We are working on Viper v2 and we would love to hear your thoughts about what you like or don't like about Viper, so we can improve or fix those issues.
⏰ If you have a couple minutes, please take some time and share your thoughts: https://forms.gle/R6faU74qPRPAzchZ9
📣 If you've already given us your feedback, you can still help by spreading the news, either by sharing the above link or telling people about this on Twitter:
https://twitter.com/sagikazarmark/status/1306904078967074816
Thank you! ❤️
This PR introduces a new (experimental) finder implementation using Afero. It's covered by more tests and is generally expected to be more stable.
Why not use
io/fs
?Viper requires Go 1.19 at this point and Afero exposes an
fs.FS
interface, so technically it would be possible.Since Viper already uses Afero, we can't completely replace it without a breaking change. Also,
fs.FS
doesn't have any writing mechanisms, so file writing and directory creation would be missing (although the long-term plan is to get rid of those).Lastly,
fs.FS
is not particularly easy to use on Windows (as mentioned in golang/go#44279).An alternative implementation can be found in #1624 using
fs.FS
. We may reuse it in the future if we decide to drop Afero and usefs.FS
only.TODO