Skip to content

Refactor Source to use fs.FS under the hood.#12

Open
SpeedyCoder wants to merge 2 commits intojohngibb:masterfrom
SpeedyCoder:master
Open

Refactor Source to use fs.FS under the hood.#12
SpeedyCoder wants to merge 2 commits intojohngibb:masterfrom
SpeedyCoder:master

Conversation

@SpeedyCoder
Copy link

This will allow users to pass in any FS implementation. For example embed.FS,
that allows usage of embedded migration files. Given that fs.FS is read only
I had to modify the Create functionality. I've removed the method from the Source
struct and moved the logic into the Create function and changed its signature to
take path instead of Source struct. This is only a helper function, so I think
even though it's a breaking change it should be fine to make.

SpeedyCoder added 2 commits November 22, 2021 10:53
This will allow users to pass in any FS implementation. For example `embed.FS`,
that allows usage of embedded migration files. Given that fs.FS is read only
I had to modify the Create functionality. I've removed the method from the Source
struct and moved the logic into the Create function and changed its signature to
take path instead of Source struct. This is only a helper function, so I think
even though it's a breaking change it should be fine to make.
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