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

Creating new method ReadConfigFS which allows users to pass use fs.FS for loading files #136

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Aquarthur
Copy link

Attempt at implementing #135 .

Quick note: I noticed that with parseFile, the file is opened before the filetype is validated. This PR pulls out the filetype validation and creates a new function getParseFunc which will return the appropriate parser function to run (if the filetype is supported). ReadConfig and ReadConfigFS then just keep going with the returned function.

Tests were added for both ReadConfigFS and getParseFunc.

@Aquarthur
Copy link
Author

Hey @ilyakaznacheev , would you be able to give your thoughts on the PR? Totally understand if you're too busy to at the moment :)

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.

1 participant