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

FS loader #134

Merged
merged 2 commits into from
Jul 4, 2022
Merged

FS loader #134

merged 2 commits into from
Jul 4, 2022

Conversation

underbek
Copy link

I often use the testfixtures library.
Often the data is in the same shared folder, but the tests are in different folders. Because of this you have to use ugly paths.
To solve this problem, I decided to add the ability to pin the target path using fs.FS.

With this simple solution, you can fix the target path for finding fixtures. At least the paths in the tests will look nice. As a maximum, you no longer have to mess with ../

@underbek underbek marked this pull request as ready for review June 12, 2022 16:19
@andreynering
Copy link
Contributor

Great idea and implementation. Thanks @underbek!

@andreynering andreynering merged commit b11f87e into go-testfixtures:master Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants