Skip to content

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

Open
Aquarthur wants to merge 3 commits into
ilyakaznacheev:masterfrom
Aquarthur:master
Open

Creating new method ReadConfigFS which allows users to pass use fs.FS for loading files#136
Aquarthur wants to merge 3 commits into
ilyakaznacheev:masterfrom
Aquarthur:master

Conversation

@Aquarthur
Copy link
Copy Markdown

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
Copy Markdown
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